-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate Query
PostPosted: Tue Jan 03, 2006 11:36 am 
Newbie

Joined: Tue Jan 03, 2006 11:12 am
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:[/b]

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]

Hello Hibernate Users,
I am fairly new to Hibernate and i was wondering if i could get some help with a Hibernate Query.

I have a table called Log which has columns viz. status,synchdate, name, id, updatedon, updatedby.

i want the findByNamedQuery method to return a list such that i get a row for each name whose status was updated most recently.

The name of the object which has these attributes is called entityLog. I want to do something like this:

select entity, max(synchdate) from entityLog where entity in(select distinct(entity) from entityLog) group by entity.

Thanks for all your help in advance.
noobie.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.