This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help Reg. DISTINCT ROOT Entity

 
Raminder Singh
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
show the query/criteria you are using.

pascal
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ November 06, 2006: Message edited by: Arun Kumarr ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic