OctopusDeploy/Nevermore

Map creation query

Closed this issue · 4 comments

Hi,

I'm just about to use Nevermore in an application an was wondering when I need to create a map for a poco class?
The only reason I ask is that in your integration tests you create maps and only map certain properties/fields.
Any help appreciated.
Kind regards
Sean.

@SeanFarrow thanks for getting in touch.

When you map a property it becomes a column in the table, otherwise all properties will be stored in the JSON column.

I hope that helps!

Thank you and best regards,
Henrik

The JSON column is included if you do transaction.Query<YourEntity>().Where("[JSON] LIKE '%Id%'"), but won't be returned if you use transaction.Load<YourEntity>(id)

For custom types you can create a JsonConverter and add it to the JsonSerializerSettings.Converters property and Nevermore should serialize/deserialize it correctly if we don't support it out-of-the-box.

Hope that helps!
Cheers,
Henrik

I'm going to close this issue for now, if you need any further information please do not hesitate to get back to us and we'll re-open it.