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>