Hi,
Today I was trying to create a table without any ID(primary or composite etc.) When I tried to map that table with corresponding bean, it's giving me compiler error in
*.hbm.xml My mapping is as follows:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="walgreens.pos.dl.analysis.db.UnrecognizedDataBean"
table="UNRECOGNIZED_DATA">
<property name="barcodeData" type="blob" not-null="false"
column="BARCODE_DATA" />
<property name="dateReceived" type="timestamp"
column="DATE_RECEIVED" not-null="false" />
<property name="msrDataTrack1" type="blob" not-null="false"
column="MSR_DATA_TRACK1" />
<property name="msrDataTrack2" type="blob" not-null="false"
column="MSR_DATA_TRACK2" />
<property name="msrDataTrack3" type="blob" not-null="false"
column="MSR_DATA_TRACK3" />
<component name="scoreBean"
class="walgreens.pos.dl.parse.Score">
<property name="percentMatch" type="int" not-null="false"
column="PERCENTAGE_MATCH" />
<property name="matchingParser" type="string"
not-null="false" column="CLOSEST_MATCHED" />
<property name="matchingCriterionIDs" not-null="false"
column="MATCHING_CRITERIA" />
<!--array name="matchingCriterionIDs" cascade="all" fetch="join">
<key column="MATCHING_CRITERIA" />
<list-index column="MATCHING_CRITERIA" />
<one-to-many class="String" />
</array-->
</component>
<!-- score bean still needs to be mapped -->
</class>
</hibernate-mapping>
Could anybody explain me why this is happening? Cann't I create a table without ID, there are so many situations where I have to create a table without any ID.
Thanks for early responses in advance!!!