-->
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: Jboss 4.3 Migration With Hibernate 3.2 Issue
PostPosted: Tue Aug 05, 2008 7:51 pm 
Newbie

Joined: Tue Aug 05, 2008 7:46 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2



Hi,

We are migrating from Jboss 3.2.2.1 SP1 to Jboss 4.3.0.GA. As the part of migration we are migrating from hibernate 2.0 to hibernate 3.2. The query functionality is returning null, if the hibernate mapping file has one or more <key-property> elements who's value is null in the database as part of the composite key represented by <composite-id> element.


For example the below mapping file has a composite key defined as a combination of 4 properties. If one of the property value in the database is null then the query returns a Collection having a null result value. But if all the values are non null then the query returns valid collection with the correct pojo object results.

This same mapping file works perfectly with hibernate 2.0 in JBOSS 3.2.2.8SP1 even if one of the property of the composite key has a null value in the database. We are experiencing this problem as part of our migration efforts.

Could you please let us know what has changed between the versions of Hibernate and JBOSS that is resulting in such inconsistent behaviour.


<hibernate-mapping>
<class
name="com.abb.sable.mi.inf2.mpr.model.ErcotMfBusinessAssociates"
table="MF_BUSINESS_ASSOCIATES"
>

<composite-id>
<key-property
name="busAssocId"
type="java.lang.Long"
column="BUS_ASSOC_ID"
length="15"
/>
<key-property
name="effDate"
type="java.sql.Date"
column="EFF_DATE"
length="7"
/>
<key-property
name="expDate"
type="java.sql.Date"
column="EXP_DATE"
length="7"
/>
<key-property
name="shortName"
type="java.lang.String"
column="SHORT_NAME"
length="12"
/>
</composite-id>

</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.  [ 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.