I ran across the same problems.

You haven't defined the type of relationship. See the line action => action.OneToMany()); in the mapping below.

public class SportMap : ClassMapping<Sport>
{
public SportMap()
{
Id(x => x.Id, map =>
{
map.Column("Id");
map.Generator(Generators.GuidComb);
});

Property(x => x.Name, map =>
{
map.NotNullable(true);
map.Length(50);
});

Bag(x => x.Positions, map =>
{
map.Key(k => k.Column(col => col.Name("SportId")));
map.Cascade(Cascade.All | Cascade.DeleteOrphans);
},
action => action.OneToMany());

Property(x => x.CreateDate);
Property(x => x.CreateUser);
Property(x => x.LastUpdateDate);
Property(x => x.LastUpdateUser);
}
}



On , Dietrich <[email protected]> wrote:
Yes, the SOP object maps it, as so.
Set(s => s.Processes, m =>

{
m.Table("SOPProcess");
m.Cascade(Cascade.DeleteOrphans);
m.Fetch(CollectionFetchMode.Subselect);
m.Key(k =>
{
k.Column("SopId");
k.ForeignKey("FK_SOPProcess_SOP");
});
});I've had trouble finding solid documentation on this stuff, so please point out my dumb mistakes.






--

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/-/_Lzf3fkUBLUJ.

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/nhusers?hl=en.




--
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
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/nhusers?hl=en.

Reply via email to