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.  [ 2 posts ] 
Author Message
 Post subject: id unsaved-value strategy UNDEFINED
PostPosted: Thu Aug 30, 2007 5:48 am 
Newbie

Joined: Wed Aug 29, 2007 10:33 am
Posts: 2
Hello,

In debug mod of the server I found a bug during the "saveOrUpdate" of an object Ventilation. The printed trace is "id unsaved-value strategy UNDEFINED". I manage to saveOrUpdate others objects but the mapping of their id was simple.

I thing that the problem com from the mapping of the id of Ventilation.

======================
Mon fichier de mapping:
--------------------------
Code:
   <class
      name="Ventilation"
      table="BUDGET_CLIENT"
   >

      <composite-id name="id" class="VentilationPK">
         <key-many-to-one
            name="versionLigneBudgetaire"
            class="VersionLigneBudgetaire"
            column="ID_BUDGET_NATURE_VERSION"
         />
         <key-many-to-one
            name="client"
            class="com.adeo.sibud.metier.referentiel.Client"
            column="ID_CLIENT"
         />
      </composite-id>
                <!--.................-->
      </class>


========================
Ma Class Ventilation:
----------------------
Code:
public class Ventilation implĂ©ments  Serializable {
   // primary key
   private VentilationPK id;
    //............
}



NB : VersionLigneBudgetaire own a set of Ventilation.

Thanks to help me.
Albéric.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 30, 2007 2:08 pm 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
Hi!

Can you please post the hibernate mapping for VentilationPK?

You might also take a look at http://www.hibernate.org/hib_docs/reference/en/html/mapping.html and search for "unsaved-value". I think this defaults to null.


-Kaj :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.