Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Cache Usage Startegy Question
PostPosted: Thu May 17, 2012 4:18 pm 
Newbie

Joined: Thu Feb 23, 2012 8:34 pm
Posts: 2
Hello,

I have cache usage question, I have the following mapping. ST_CD is mapped twice to 2 different properties for whatever reason. Hibernate is throwing
Code:
org.hibernate.MappingException: Repeated column in mapping for entity: my.package.State column: ST_CD (should be mapped with insert="false" update="false")
.

I have cache usage as "read-only", so i guess insert and updates are always false; why should I explicitly say that?


Code:
   
<class mutable="false" name="my.package.State" table="STATE_TABLE">
    <cache usage="read-only" />
    <id name="id" column="ST_ID" type="long" />
    <property name="code" type="string" column="ST_CD" />
    <property name="stateAbbreviationCode" type="string" column="ST_CD"/>
    <!- Other properites -->
</class>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.