forked from hibernate/hibernate-tools
/
HashEquals.hbm.xml
55 lines (44 loc) · 1.83 KB
/
HashEquals.hbm.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!--
This mapping demonstrates how to map a collection
<key> to one of the primary key columns of an
associated child class with a composite key. This
is very useful for legacy data!
-->
<hibernate-mapping package="org.hibernate.tool.hbm2x">
<class name="HashEquals">
<!-- Normally *bad* practice to put global use-in-equals. Only here for testing -->
<meta attribute="use-in-equals">true</meta>
<id name="id" type="string"/>
<property name="name" type="java.lang.String[]"/>
<property name="byteArray" type="byte[]"/>
<property name="floatArray" type="float[]"/>
<property name="intArray" type="int[]"/>
<property name="shortArray" type="int[]"/>
<property name="booleanArray" type="boolean[]"/>
<component name="addressComponent" class="Address">
<property name="streetAddress1" type="string"
column="StreetAddress1" not-null="true">
<meta attribute="use-in-equals">true</meta>
</property>
<property name="streetAddress2" type="string"
column="StreetAddress2" />
<property name="city" type="short" column="City"
not-null="true">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<meta attribute="property-type">short</meta>
</property>
<property name="postcode" type="java.lang.String[]" column="postcode"
not-null="true" />
<!-- <many-to-one name="state" class="au.com.groupware.model.State" column="StateId"
foreign-key="FK_Address_State" not-null="true" /> -->
<property name="verified" type="boolean">
<meta attribute="use-in-equals">true</meta>
</property>
</component>
</class>
</hibernate-mapping>