-->
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.  [ 3 posts ] 
Author Message
 Post subject: Return List on Criteria
PostPosted: Fri Dec 30, 2005 12:47 am 
Beginner
Beginner

Joined: Fri Dec 26, 2003 3:21 pm
Posts: 23
Location: Jakarta
I dont know this is a tips or a wrong syntax

I change my criteria

from

results = session.find(query);

to

results = session.createCriteria(query).list();


I use hibernate 3.1 right now.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 30, 2005 1:13 am 
Expert
Expert

Joined: Thu May 26, 2005 9:19 am
Posts: 262
Location: Oak Creek, WI
Hi,

This is wrong
results = session.createCriteria(query).list();

use createQuery for queries.

Do read this before you post some more questions?

http://www.hibernate.org/250.html

http://www.hibernate.org/hib_docs/v3/re ... teria.html

_________________
RamnathN
Senior Software Engineer
http://www.linkedin.com/in/ramnathn
Don't forget to rate.


Top
 Profile  
 
 Post subject: createQuery
PostPosted: Fri Dec 30, 2005 2:20 am 
Beginner
Beginner

Joined: Fri Dec 26, 2003 3:21 pm
Posts: 23
Location: Jakarta
Hi ram,

thanks for the answers

I use this syntax in my session.find(x,x,x)

results = session.createQuery(query, parameters, hibernate_parameter_types);

eclipse produce error.. can help?

I post also this question in:

http://forum.hibernate.org/viewtopic.php?t=953461


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