Thanks James, Yeah, I was stuck on the Key.Column and Relationship.Column thing. Just to make sure I am understanding correctly, are you recommending that I set the 2 key values via IHasManyToManyConvention but use ManyToManyTableNameConvention for the table name? Also, do I need to override both GetBiDirectionalTableName and GetUniDirectionalTableName? Thanks again for the help!
Chris On Aug 27, 4:07 am, James Gregory <[email protected]> wrote: > Also, consider using the acceptance > criteria<http://wiki.fluentnhibernate.org/Conventions#Conditional_applying_of_...> > instead > of your null checks, as you can't guarantee something will be null as they > get pre-populated with default values. > > On Thu, Aug 27, 2009 at 11:06 AM, James Gregory > <[email protected]>wrote: > > > Firstly, be careful setting the many-to-many table name like you are, you > > can get into a mess like that. I'd recommend overriding the many-to-many > > table naming > > convention<http://wiki.fluentnhibernate.org/Available_conventions#ManyToManyTabl...>, > > which is specifically designed to handle both sides of a bi-directional > > many-to-many. > > ParentKeyColumn == Key.Column > > ChildKeyColumn == Relationship.Column > > > The latter is a little unclear I realise. > > > On Wed, Aug 26, 2009 at 6:54 PM, Chris Willard < > > [email protected]> wrote: > > >> Hello, > > >> I am in the process of upgrading to the Fluent 1.0RC and and stuck on > >> my IHasManyToManyConvention convention. I can't seem to figure out > >> how to update ParentKeyColumn and ChildKeyColumn. Below is my > >> original version. > > >> public void Apply(IManyToManyPart target) > >> { > >> if (target.TableName == null) > >> target.WithTableName(target.EntityType.Name + > >> target.ChildType.Name); > >> if (target.ParentKeyColumn == null) > >> target.WithParentKeyColumn(target.EntityType.Name + > >> "ID"); > >> if (target.ChildKeyColumn == null) > >> target.WithChildKeyColumn(target.ChildType.Name + > >> "ID"); > >> } > > >> Thanks in advance, > >> Chris > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
