That is exactly what I was looking for.
Thanks again for a great tool.
Regards,
John
-Original Message-
From: Gavin King [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 18, 2003 6:06 AM
To: Urberg, John
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Hibernate] Saving Collections fro
Interceptor and my code.
Please let me know if this looks like a reasonable way to make Hibernate
function in a 3-tier environment.
Thanks,
John
-Original Message-
From: Urberg, John [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 11:21 AM
To: '[EMAIL PROTECTED]'
MAIL PROTECTED]
Sent: Thursday, October 16, 2003 3:12 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Hibernate] Saving Collections from Multiple Sessions
Hibernate also seems to always assume objects from different sessions are
dirty. (I'm using saveOrUpdate() in 1.2.5. Maybe this
3-tier environment.
Thanks,
John
-Original Message-
From: Urberg, John [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 11:21 AM
To: '[EMAIL PROTECTED]'
Subject: [Hibernate] Saving Collections from Multiple Sessions
We have a 3-tier Java GUI application using Hiber
We have a 3-tier Java GUI application using Hibernate as the O/R mapping
layer. We've run into the problem of dealing with updating collections from
other sessions. It seems Hibernate will recreate the collection if the
collection was loaded with a different persisted (see
SessionImpl.prepareColl
>
> <[EMAIL PROTECTED]>
>To:
> <[EMAIL PROTECTED]>
>
> Sent by:
> cc:
[EMAIL PROTECTED] Subject: [Hibernate] Saving
collections...
Easy question, I think.
I am trying something like this:
Product p = new Product();
p.setName("blah");
ProductLineItem item = new ProductLineItem();
item.setName("blah line item");
// Add a line item to the product
p.addLineItem(item);
Session.save(p);
.and it is inserting the Product, and