Reputation: 8531
I have an object that contains a collection of TimeSpan
like Note.Reminders
, where reminders is List<TimeSpan>
. How to I map this using Fluent NHibernate?
Currently I have mapped it as m.HasMany(c=>c.Reminders).Access.CamelCaseField()
.
But it complains that it can not find a mapping for type TimeSpan
.
Upvotes: 1
Views: 742
Reputation: 56934
Also, make sure that the type in your database to store those timestamps is an Int64.
Upvotes: 0
Reputation: 59346
HasMany
maps associations to other entities. TimeSpan
s are values, not entities. Therefore you should use Map(c=>c.Reminders);
instead.
Upvotes: 0