It happened to me once. My guess is that you did not specify the foreign key name, so NHibernate generates a random key name. When it does an update, it cannot determine whether the existing key represents the same relationship as the new key, so the relation is created again (please someone correct me if I'm wrong).
I've also heard that Update Schema is not as reliable as dropping the schema and create again. I never use Update because of that Regards, Thiago Alves On Sun, Nov 14, 2010 at 11:03 AM, Afshar Mohebbi <[email protected]>wrote: > Hi, > > Suppose I have a database that is just created based on some hbms. I > add a field to one of entities and use SchemaUpdate to update databse > with current change. Unfortunately UpdateSchema in addition to > generating ascript to add the new field, gnerates mostly all foregin > key constraints again as duplicate. > > Am I missing something or is it a bug? > > > Regards, > Afshar Mohebbi > > -- > 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]<nhusers%[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.
