-->
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: identifier of an isntance of literal altered from literal to
PostPosted: Wed Jul 27, 2005 4:36 pm 
Beginner
Beginner

Joined: Wed Jul 20, 2005 2:57 pm
Posts: 28
Hi

In my mapping a part of my primary key(Literal) is a foreign (composite) key (of Enumeration). I get the following exception:
identifier of an instance of model.Literal altered from model.Literal@1112776 to model.Literal@1112776.

I don't know where and how the PK of Literal must be set.

Here is the mapping of Literal:
Code:
<hibernate-mapping package="model">
   <class
      name="Literal"
      table="literal"
   >
   <composite-id>
      <key-property name="packageid" type="java.lang.Long"/>
      <key-property name="name" type="java.lang.String"/>
   <key-property
      name="name"
      type="java.lang.String"
      column="name"
   />
   </composite-id>
    <many-to-one
      name="pk_enum"
      insert="false"
      update="false"
      class="Enum">
      <column name="packageid"/>
      <column name="name"/>       
   </many-to-one>
      <property...


and this is the Mapping of Enum:
Code:
<hibernate-mapping package="model">
   <class
      name="Enum"
      table="enum"
   >
      <composite-id>
         <key-many-to-one
            name="packageid"
            class="Xpackage"
            column="packageid"
         />
         <key-property
            name="name"
            column="name"
            type="java.lang.String"
         />
      </composite-id>
      <property...


Any help is greatly appreciated!

Thanks in advance,
Kurt


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.