Hi Thiago,
I did not specify the foreign key names. So this may be the cause. But
how can do specify that in both NHibernate/Castle ActiveRecord?
Thanks in Advance
On Nov 14, 4:39 pm, Thiago Alves <
thiago1...@gmail.com> wrote:
> 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
> <
afshar.mohe...@gmail.com>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
nhu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
nhusers+u...@googlegroups.com<
nhusers%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >
http://groups.google.com/group/nhusers?hl=en.- Hide quoted text -
>
> - Show quoted text -