ComponentAsId does not set Id Property
Description
Environment
None
Attachments
1
is duplicated by
Activity
Show:
Oskar Berggren May 30, 2012 at 6:31 PM
Closing issues fixed in 3.3.1.CR1.
Oskar Berggren January 6, 2012 at 2:11 PM
Contributed fix committed. Thanks!
95bf30476565c71c46aff46577439d1f2c7c42f4
Eamon Hetherton January 5, 2012 at 6:58 AM
Created a pull request instead
https://github.com/nhibernate/nhibernate-core/pull/42
Eamon Hetherton January 5, 2012 at 6:58 AM
Created a pull request instead
https://github.com/nhibernate/nhibernate-core/pull/42
Eamon Hetherton January 5, 2012 at 5:55 AM
Created test case and fix.
Fixed
Details
Assignee
Reporter
Eamon Hetherton
Eamon HethertonLabels
Components
Fix versions
Affects versions
Priority
Major
Who's Looking?
Open Who's Looking?
Created January 3, 2012 at 12:23 AM
Updated May 22, 2014 at 1:28 AM
Resolved January 6, 2012 at 2:11 PM
Who's Looking?
"name" attribute is not set to property name in generated xml-mapping when using ComponentAsId.
e.g.
mapper.Class<MyClass>(map => map.ComponentAsId(id => id.Identity, cid =>
{
cid.Property(x => x.Id, x => x.Length(20));
cid.Property(x => x.EffectiveDate);
}));
Actual:
<composite-id class="EffectiveDateId, Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<key-property name="Id" type="AnsiString" length="20" />
<key-property name="EffectiveDate" />
</composite-id>
Expected:
<composite-id name="Identity" class="EffectiveDateId, Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<key-property name="Id" type="AnsiString" length="20" />
<key-property name="EffectiveDate" />
</composite-id>
possibly related:
See http://stackoverflow.com/questions/8676120/nhibernate-componentasid-does-not-actually-set-id-property