Changing the line
HasMany(x =>
x.GetAssets()).Access.
CamelCaseField(Prefix.Underscore).ReadOnly().AsBag();
HasMany(x => x.GetAssets()).ReadOnly().AsBag();
Gives me this error:
System.ArgumentException : Not a member access
Parameter name: expression
@James Gregory Exporting the xml created from HasMany(x =>
x.GetAssets()).Access.
CamelCaseField(Prefix.Underscore).ReadOnly().AsBag();
is
<bag access="field.camelcase-underscore" inverse="true" name="*_assets*"
mutable="false">
<key>
<column name="Gift_id" />
</key>
<one-to-many class="BlogSamples.Core.Domain.Asset, BlogSamples.Core,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bag>
I think NHibernate itself adds prepends the extra underscore on so:
_assets becomes __assets
whereas I think the correct hbm output would be
<bag access="field.camelcase-underscore" inverse="true" name="*assets*"
mutable="false">
which NHibernate would interpret as _assets
I maybe though
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/fluent-nhibernate/-/l94q3P07upYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en.