Joined: Wed Jun 30, 2004 3:51 pm Posts: 7
|
I am accessing UDB 7.2.8 and 8 (DB2 for Distributed platforms).
Our DBAs use Timestamps for primary keys on the tables.
There is no need to use any generator strategy since current
Timestamp gets inserted as we create the row.
My question is:
How do I set up the mapping for the
ids - specifically for the generator.
One of the mapping files may look like this. I put the generator
as native just to have something there.
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping.dtd">
<hibernate-mapping>
<class name="com.labcorp.test.Level" table="SKILSTRK.COMP_LEVEL">
<id name="timestampId" column="SKILSTRK.COMP_LEVEL.COMP_LEVEL_ID" type="timestamp">
<generator class="native"/>
</id>
<property name="description" column="SKILSTRK.COMP_LEVEL.DESCRIPTION_TXT" type="string"/>
<property name="levelName" column="SKILSTRK.COMP_LEVEL.COMP_LEVEL_NM" type="string"/>
</class>
</hibernate-mapping>
Please help,
Edmon B.
|
|