db2 - Multiple generated fields in single hibernate mapping file? -
i attempting retro-fit physical database model in db2 hibernate mapping ... however, handful of tables have primary key identity , separate unique index (not part of primary key) generated using sequence object in db2. possible have both generated fields mapped in single hibernate mapping file? experiencing issues (we feel other reasons although not totally clear when @ stack trace @ app startup) wondered if because of attempts making map 2 (2) different fields 'generated'. here trying:
<hibernate-mapping> <class entity-name="abcentity" name="abcentity" table="abctable"> <id name="identitynumber" type="java.lang.integer"> <column name="abc_identity"/> <generator class="identity"></generator> </id> <property name="sequencenumber" type="java.lang.integer"> <column name="abc_sequence"/> <generator class="sequence"> <param name="sequence">abc_seq</param> </generator> --> </property> <property name="abcfield1" type="date"> <column name="abc_field1" /> </property> </class> </hibernate-mapping>
thanks in advance ideas or solutions.
Comments
Post a Comment