Re: nhibernate - id change
- From: "Roman" <dzikweekendowy@xxxxxxxxxxxxxx>
- Date: Fri, 2 Dec 2005 16:01:21 +0100
>> update TABLE
>> set ID = 'new_id' where ID = 'old_id'
>
> You just can't do that - Hibernate would get very confused about which
> object you were talking about.
>
> It sounds like you really need a different primary key, I'm afraid.
>
> (You could go behind Hibernate's back and just make the change directly
> to the database - it's not very nice though...)
i know.
but im affraid that im in the situation in which doing little behind
hibernate
and leave keys as their are right now will be less evil (less work).
after setting new key id in the database object but before saving to
database
i could execute query that will change just the primary key, and later
save whole db object. but it would not be nice :/
regards
roman
.
- Follow-Ups:
- Re: nhibernate - id change
- From: Roman
- Re: nhibernate - id change
- References:
- nhibernate - id change
- From: Roman
- Re: nhibernate - id change
- From: Jon Skeet [C# MVP]
- Re: nhibernate - id change
- From: Roman
- Re: nhibernate - id change
- From: Jon Skeet [C# MVP]
- nhibernate - id change
- Prev by Date: Re: Anyone know how...
- Next by Date: Serialize A Dictionary
- Previous by thread: Re: nhibernate - id change
- Next by thread: Re: nhibernate - id change
- Index(es):
Relevant Pages
|