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.  [ 2 posts ] 
Author Message
 Post subject: how to Get specific field in the Criteria.UniqueResult()
PostPosted: Fri Oct 26, 2007 5:26 pm 
Newbie

Joined: Fri Oct 26, 2007 5:09 pm
Posts: 1
Hello...

i´ve been trying to access an specific field returned by the Criteria.UniqueResult().

I´m creating the Criteria dynamically, so i don´t know wich object the criteria refers to.

All i need is the ID field of the object returned.

Someone have an Idea???


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 27, 2007 12:09 am 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
It would help to post some code but I am assuming by 'field' you mean a property on an object?.
UniqueResult() is returning an entity so why can't you just MyEntity.Id?
Without code it is hard to help.

_________________
If this helped...please remember to rate it!


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