No problem Asher, now we are talking. I think it is not a bug, but you might be mapping a bidirectional relationship..
Like Order.Currency and Currency.Orders .. or something alike. If that is your case, you are overriding only one of the mappings the one for ManyToOne. Please, check what Fabio did in this post http://fabiomaulo.blogspot.com/2011/04/nhibernate-32-mapping-by-code_13.html 2011/7/13 asher newcomer <[email protected]> > Apologies for the offense. The name is a reference to the Eddie Murphy > movie Coming to America: > > http://www.youtube.com/watch?v=7ef0JqH67V8 > > I'll go ahead and change it. I had frankly forgotten it was set as such. > > On Tue, Jul 12, 2011 at 11:38 PM, José F. Romaniello < > [email protected]> wrote: > >> The name that you have used to send this mail ( SexualChocolate ) is >> inappropriate and *it is not even funny*. >> I hope the guys in this forum answer you with the same level of >> seriousness. >> >> 2011/7/12 SexualChocolate <[email protected]> >> >>> Trying out the new ConventionModelMapper (just awesome, btw), and >>> can't get the following to work correctly: >>> >>> mapper.BeforeMapManyToOne += (insp, typ, map) => >>> map.Column(typ.LocalMember.GetPropertyOrFieldType().Name + "Id"); >>> >>> Let's say for example that I have a 'Order' object which has a >>> 'Currency' property in a many to one relationship. I want the >>> following schema: >>> >>> create table Order( >>> [other columns] >>> CurrencyId INT >>> ) >>> >>> But when I apply the above code it's generating: >>> >>> create table Order( >>> [other columns] >>> CurrencyId INT >>> Currency INT >>> ) >>> >>> Am I going about this incorrectly or is this a bug? >>> >>> Thank you in advance >>> >>> -- >>> 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. >>> >>> >> -- >> 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. >> > > -- > 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. > -- 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.
