From: "Gavin King" <[EMAIL PROTECTED]>
To: "Troy McKinnon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, November 02, 2003 8:45 PM
Subject: Re: [Hibernate] updating exiting objects with a new clone
Oh, P.S. perhaps what you are looking for
From: "Gavin King" <[EMAIL PROTECTED]>
To: "Troy McKinnon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, November 02, 2003 8:45 PM
Subject: Re: [Hibernate] updating exiting objects with a new clone
> Oh, P.S. perhaps what you are lookin
Cheers
Troy
- Original Message -
From: "Gavin King" <[EMAIL PROTECTED]>
To: "Troy McKinnon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, November 02, 2003 8:09 PM
Subject: Re: [Hibernate] updating exiting objects with a new clone
G I
don't see a problem with having Hibernate 'check' if it exists
and USE this object as if it had been loaded.
Cheers
Troy
- Original Message -
From: "Gavin King" <[EMAIL PROTECTED]>
To: "Troy McKinnon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTE
MAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, November 02, 2003 8:09 PM
Subject: Re: [Hibernate] updating exiting objects with a new clone
> G I hate this. I think it almost always indicates that you are
> using Hibernate "wrong". You should be able to do the
I will do that. Just seems like a lot of overhead. Especially on an large
dataset with a lot of rows.
Troy
- Original Message -
From: "David Rees" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 02, 2003 8:08 PM
Subject: Re: [Hibernate] updating
G I hate this. I think it almost always indicates that you are
using Hibernate "wrong". You should be able to do these kind of things
using saveOrUpdate(); thats what its there for. Get the object in the
/previous/ transaction, set its state, and then call saveOrUpdate().
Now, I can incred
Troy McKinnon wrote:
> The only way I can see doing this now is to transfer the field values
> from myItem to fromDatabase.
> (Note: using the reflect package to do this is fairly trivial - but just
> more work )
> If there was some way to updateSimilar or updateFromClone or similar
> method that
http://forum.hibernate.org/old/914765.html
talks around the issue I amhaving but it doesn't really solve
anything.
We start with an object manually created.
>> MyItem myItem = new MyItem(id, name,
desc);
I then check to see if it already exists. To
determine if I want to do an