~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/legacy/Map.hbm.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE hibernate-mapping PUBLIC 
 
3
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 
4
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
5
        
 
6
<hibernate-mapping default-lazy="false">
 
7
 
 
8
    <class entity-name="TestMap">
 
9
 
 
10
        <id name="id" type="long" column="id_">
 
11
            <generator class="hilo"/>
 
12
        </id>
 
13
 
 
14
        <property name="name" type="string"/>
 
15
        <property name="address" type="string"/>
 
16
 
 
17
        <many-to-one name="parent" entity-name="TestMap"/>
 
18
 
 
19
        <bag name="children" inverse="true" lazy="false">
 
20
                <key column="parent"/>
 
21
                <one-to-many entity-name="TestMap"/>
 
22
        </bag>
 
23
 
 
24
        <dynamic-component name="cmp">
 
25
                <property name="a" type="integer"/>
 
26
                <property name="b" type="float"/>
 
27
        </dynamic-component>
 
28
    </class>
 
29
    
 
30
        <class entity-name="ParentMap">
 
31
 
 
32
                <id name="parentId" column="ParentId" type="long" unsaved-value="null">
 
33
                        <generator class="hilo">
 
34
                                <param name="sequence">parent_sequence</param>
 
35
                        </generator>
 
36
                </id>
 
37
 
 
38
                <version name="version" type="java.lang.Integer" column="version"/>
 
39
                <property name="field" type="string" column="Field" length="50"/>
 
40
 
 
41
                <one-to-one name="child" entity-name="ChildMap" cascade="all" outer-join="false" constrained="false" property-ref="parent"/>
 
42
        </class>
 
43
 
 
44
        <class entity-name="ChildMap">
 
45
 
 
46
                <id name="childId" column="ChildId" type="long" unsaved-value="null">
 
47
                        <generator class="hilo">
 
48
                                <param name="sequence">child_sequence</param>
 
49
                        </generator>
 
50
                </id>
 
51
 
 
52
                <property name="field" type="string" column="Field" length="50"/>
 
53
 
 
54
                <many-to-one name="parent" entity-name="ParentMap" cascade="all" outer-join="false" column="ParentId" not-null="true"/>
 
55
        </class>
 
56
 
 
57
</hibernate-mapping>