-->
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: criteriaQuery() outside tomcat = 0 results
PostPosted: Fri Feb 24, 2006 12:07 am 
Beginner
Beginner

Joined: Tue May 03, 2005 11:45 pm
Posts: 43
This query works outside my tomcat container:

list = session.createQuery("from Zipcode").setString("zip", zipcode).list();

This one does not:

List results = session.createCriteria(Zipcode.class).list();

Any ideas why a criteriaQuery would not? It doesn't show any generated sql either.


Hibernate version:

3

Code between sessionFactory.openSession() and session.close():

Name and version of the database you are using:

mysql 5


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 6:42 am 
Beginner
Beginner

Joined: Wed Aug 04, 2004 4:33 am
Posts: 45
Location: Switzerland
Can you post your mapping document?


Top
 Profile  
 
 Post subject: mapping doc
PostPosted: Fri Feb 24, 2006 8:52 am 
Beginner
Beginner

Joined: Tue May 03, 2005 11:45 pm
Posts: 43
<hibernate-mapping>
<class name="Zipcode" table="zipcode" mutable="false" lazy="false">
<id name="zip" column="zip"/>
<property name="city" column="city"/>
<property name="state" column="state"/>
<property name="stateCode" column="state_code"/>
<property name="areaCode" column="area_code"/>
<property name="type" column="type"/>
<property name="cityType" column="city_type"/>
<property name="lat" column="latitude"/>
<property name="lon" column="longitude"/>
</class>
</hibernate-mapping>


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.