Fixed
Details
Details
Assignee
Alex Zaytsev
Alex ZaytsevReporter
Thomas Gaboriau
Thomas GaboriauLabels
Components
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created March 28, 2012 at 9:30 AM
Updated September 8, 2014 at 11:31 AM
Resolved February 9, 2013 at 12:53 AM
e.g.
public class Key
{
public string GroupId { get; set; }
public string NameId { get; set; }
public override bool Equals( object obj )
{
Key key = obj as Key;
if ( key == null )
{
return false;
}
return ( key.GroupId == GroupId && key.NameId == NameId );
}
public override int GetHashCode()
{
return GroupId.GetHashCode() + NameId.GetHashCode();
}
}
public abstract class NotMappedParent
{
public virtual Key Id { get; set; }
}
public class Child : NotMappedParent
{
public virtual string Value { get; set; }
}
mapper.Class<Child>(ca =>
{
ca.ComponentAsId(s => s.Id, map =>
{
map.Property(key => key.GroupId);
map.Property(key => key.NameId);
});
});
Actual :
<id type="Int32" />
Expected :
<composite-id class="Key" name="Id">
<key-property name="GroupId" />
<key-property name="NameId" />
</composite-id>