aspose file tools*
The moose likes Object Relational Mapping and the fly likes Help Reg. DISTINCT ROOT Entity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Help Reg. DISTINCT ROOT Entity" Watch "Help Reg. DISTINCT ROOT Entity" New topic
Author

Help Reg. DISTINCT ROOT Entity

Raminder Singh
Ranch Hand

Joined: Mar 01, 2002
Posts: 72
Hi,
I have a query:
In Criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); is Primary Key Column is DISTINCT_ROOT_ENTITY?
i have a table say

ID -- Country -- City
1 -- IN -- DEL
2 -- IN -- MUM
3 -- IN -- CHD
4 -- US -- NYC
5 -- US -- DEN

I am getting list representing ROW as an object. I want to get distinct 'country' records? here ID is Primary Key. how
DISTINCT_ROOT_ENTITY on country should be set?

thanks
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
show the query/criteria you are using.

pascal
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 513


[ November 06, 2006: Message edited by: Arun Kumarr ]

If you are not laughing at yourself, then you just didn't get the joke.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help Reg. DISTINCT ROOT Entity