-->
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: many-to-one mapping doesnt return values
PostPosted: Wed Jun 15, 2005 11:35 pm 
Newbie

Joined: Fri Jun 03, 2005 3:39 pm
Posts: 9
using hibernate 3.0.5, java 1.5, and mysql.
i have a mapping
<hibernate-mapping default-lazy="false">
<class name="com.party.model.EMailAddress" table="email">
<many-to-one name="party" column="PARTY_PARTY_ID" class="com.party.model.Party"/>

and the query is
from com.party.model.EMailAddress emailAddress
where emailAddress.party.id = :id
i've checked the debug statements and it is binding the value for the parameter :id and i've also executed the query from debug stmts (show-sql=true) with the parameter value and it works just fine.But it does not return the row in the java class where i'm calling the query, it returns a null value.
i removed the mapping and the query works just fine. And one more important thing is, my friend who is running on the hibernate .0.3 and java 1.4 is able to run the query and get the results for the same code. Any help/comments or similar observations will be really appreciated. Thanks


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.