Web Developer | MCPD Certify
Skype.: 4042-6002 | Cel.: (31) 8681-1986
bindsolution.comMicrosoft Parner Network
--
You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluent-nhibern...@googlegroups.com.
To post to this group, send email to fluent-n...@googlegroups.com.
Visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Yes, but you'll still need to use a map to mark one end inverse. I don't recall how nh operates without that detail. Also use iset or Icollection unless you need to maintain order (1 st 2 nd etc)
I'll stick with the IAutoMappingOverride :)
Any tips on this error? Only occurs if I set the interface IAutoMappingOverride
public class CompanyConvention : IAutoMappingOverride<Company>
{
public void Override(AutoMapping<Company> mapping)
{
mapping.HasManyToMany(a => a.Persons).Cascade.AllDeleteOrphan().Not.Inverse();
}
}
public class ManyToManyConvention : IHasManyToManyConvention
{
public void Apply(IManyToManyCollectionInstance instance)
{
if (instance.OtherSide == null)
{
instance.Table(
string.Format(
"{0}To{1}",
Inflector.Pluralize(instance.EntityType.Name),
Inflector.Pluralize(instance.ChildType.Name)));
}
else
{
instance.Inverse();
}
}
}