-->
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.  [ 3 posts ] 
Author Message
 Post subject: how to use hibernate impl classes to get the id of an entity
PostPosted: Thu Mar 24, 2011 12:36 pm 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
I have this

Object fetchIdFromBean(Object entity);

The entity passed in may be an Object or a hibernate proxy with just an id inside. I am writing an ETL transformation layer on an existing hibernate layer. Is there a method in hibernate somewhere I can call that will return the id back for me?

thanks,
Dean

_________________
The list of compelling reasons to reduce the estimate does not include you simply wishing it would take less time - Unknown


Top
 Profile  
 
 Post subject: Re: how to use hibernate impl classes to get the id of an entity
PostPosted: Thu Mar 24, 2011 2:19 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Session.getIdentifier(Object)


Top
 Profile  
 
 Post subject: Re: how to use hibernate impl classes to get the id of an entity
PostPosted: Fri Mar 25, 2011 12:25 pm 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
sweeeet, thanks!!!
Dean

_________________
The list of compelling reasons to reduce the estimate does not include you simply wishing it would take less time - Unknown


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.