-->
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: hibernate mapping error by clob.
PostPosted: Sun Aug 23, 2009 10:58 pm 
Newbie

Joined: Tue Apr 03, 2007 5:42 am
Posts: 13
I use a map.
but hibernate can not to find a value(clob type) by item.

for example. if revision have m1, m2. then m1 have 'test' value. and m2 have null value.
this problem cause value type is clob.
Code:
Meta haveMeta = metaDao.findByCode("M1");
Meta nullMeta = metaDao.findByCode("M2");
Revision revsion = revisionDao.getRevision(123);
revision.getMetaDatas().get(haveMeta); // return "test". ok
revision.getMetaDatas().get(nullMeta); // return null. not contain in map. fail.


Code:
<class name="Revision">
   <map name="metaDatas" table="REVISION_META" cascade="all,delete-orphan">
      <key column="REVISION_SEQ"></key>
      <map-key-many-to-many class="com.vine.edms.contents.meta.Meta" column="META_CODE" />
      <element type="text">
         <column name="META_VALUE" />
      </element>
   </map>
</class>


critical problem is "no update this record". if try to update data, then hibernate insert record.-_-;;
how to solve this problem?


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.