-->
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: auincrement id in composed-id cant get id when saving
PostPosted: Sun Aug 08, 2010 4:13 am 
Newbie

Joined: Sun Aug 08, 2010 4:04 am
Posts: 1
Hi everyone,
I m facing this problem from some days,
i have an object that has 2 identifier, an auincrement ID, and a date
HBM:
<hibernate-mapping>
<class name="dao.Equipement" table="equipement" catalog="noteflex">
<composite-id name="id" class="dao.EquipementId">
<key-property name="equipementId" type="java.lang.Long" >
<column name="equipement_id" />
</key-property>
<key-property name="equipementDateMaj" type="timestamp">
<column name="equipement_date_maj" length="0" />
</key-property>
</composite-id>
</hibernate-mapping>

when i save and equipement object equipementId null and equipement_date_maj null, too, in the database everithing is fine
i get a new ID and the date is set to NOW
but in my application the Serialisable returned value of SAVE method as equipementId set to null and equipement_date_maj to null too.
help please


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.