How can I create a simple class/hbm.xml file that DOES NOT have an ID. I thought the name attribute was optional: If the name attribute is missing, it is assumed that the class has no identifier property.
I just want to have a table with NO ID:
Example:
create table LOCAL_HISTORY_TB (
val_c VARCHAR(512) not null,
iso_code_c CHAR(2),
)
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping schema="refsdev" >
<class name="com.gs.fw.gc.core.refs.HistoryTB" table="HISTORY_TB">
<id>
<generator class="assigned"/>
</id>
<property name="val" column="val_c" length="512" not-null="true"/>
<property name="isoCode" column="iso_code_c" length="2" not-null="false"/>
</class>
</hibernate-mapping>
Thanks!!!!
|