Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Re: specific fields in select
PostPosted: Tue Aug 26, 2003 7:14 pm 
Newbie

Joined: Tue Aug 26, 2003 7:12 pm
Posts: 4
Hi
Is it possible to select specific fields from a table or use a function like distinct on a field.

Thanks
Ravi


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2003 7:18 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Of course. Please read the documentation.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2003 8:38 pm 
Newbie

Joined: Tue Aug 26, 2003 7:12 pm
Posts: 4
Christian
I have two tables, one of the columns in the table where i want to run the select has a foreign key. My intent is to run the query using the distinct function on that column, however instead of hardcoding the sql statement, i wanted to see if there was some way that i could use the mappings to generate the sql.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2003 8:43 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Take your time and start reading:

http://www.theserverside.com/resources/ ... wnload.jsp
http://www.theserverside.com/resources/ ... =Hibernate

And of course read HibernateExamples and some other links on the Hibernate website. The reference documentation is also a very good idea once you get the basic concepts of object/relational mapping. I'm sorry, but there's no easy answer waiting for your question...

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2003 9:43 pm 
Newbie

Joined: Tue Aug 26, 2003 7:12 pm
Posts: 4
Christian
Thanks for the info. It was quite simple once i read the documentation.

Ravi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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.