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
|