-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Non-explicit primary keys across sessions
PostPosted: Tue Jan 27, 2004 7:05 pm 
Beginner
Beginner

Joined: Tue Jan 27, 2004 6:58 pm
Posts: 20
Hi there,

This is my first post to the Hibernate forums - I'm a big fan of the architecture (I worked on another persistence framework that could have been a kissing cousin of Hibernate).

Here is my inaugural question. I have an application framework that I am integrating Hibernate with. One of the features of this framework is the fact that persistent ID keys are stored in as part of a business objects meta-data (meaning that there is typically not going to be a field on the BO for the persistence key).

As I am building the interface layer between my app framework and Hibernate, I notice that if I retrieve a BO in one session, but attempt to save an update to it in a separate session, it is saved as a new object instance, presumably because the new session has no idea how to get the persistence key from the meta-data.

Anyway, I have RTM'd and I don't see s way right offhand that would allow me to pass the appropriate key to the new session so that it can properly update. Any ideas?

Cheers,

Jonathan House


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2004 7:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate has an overloaded version of update() which takes an id.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2004 8:28 pm 
Beginner
Beginner

Joined: Tue Jan 27, 2004 6:58 pm
Posts: 20
Thank you for the quick response. By the way, how was your trip to Wal-Mart?

Regards,

Jonathan House


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2004 12:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
By the way, how was your trip to Wal-Mart?


eh? what are you taking about?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2004 4:09 am 
Beginner
Beginner

Joined: Tue Jan 27, 2004 6:58 pm
Posts: 20
Sorry - should have added more context - I work with MVSC in Utah - I understand they had you come in to do some performance tuning.

Regards,

Jonathan House


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2004 11:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
OK, well, I guess if I would have been doing any work for large organizations like that recently, it would reflect quite badly on me if people thought I was shooting my mouth off about it without seeking permission from them first...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.