How can I map a many-to-one relationship where the "one" entity has a composite-id? For example:
public class SingleEntity
{
public virtual int FirstId{get;set;}
public virtual int SecondId{get;set;}
public virtual string SomeData{get;set;}
}
The entity ManyEntity has (in addition to a primaryKey) columns for both SingleEntity's FirstId and SecondId, so I want to be able to mape the relationship so that ManyEntity would look like that:
public class ManyEntity
{
public virtual int Id{get;set;}
public virtual SingleEntity Single{get;set;}
public virtual string Name{get;set;}
}
How can I do it using NHibernate?
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/wgT99kI1eZgJ.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/BxsUfEfLbHIJ.