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

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/formulajoin/Master.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
<!--
 
7
  
 
8
  Demonstrates use of an association "filtered" using a formula
 
9
  mapping in the foreign key.
 
10
  
 
11
-->
 
12
 
 
13
<hibernate-mapping package="org.hibernate.test.formulajoin">
 
14
 
 
15
        <class name="Master" table="t_masters">
 
16
        
 
17
                <id name="id">
 
18
                        <generator class="increment"/>
 
19
                </id>
 
20
                
 
21
                <property name="name" 
 
22
                        not-null="true" 
 
23
                        length="100" 
 
24
                        update="false"/>
 
25
                
 
26
                <many-to-one name="detail" 
 
27
                                property-ref="currentMaster" 
 
28
                                insert="false"
 
29
                                update="false">
 
30
                        <column name="id"/>
 
31
                        <formula>1</formula>
 
32
                </many-to-one>
 
33
                
 
34
        </class>
 
35
 
 
36
        <class name="Detail" table="t_details">
 
37
        
 
38
                <id name="id">
 
39
                        <generator class="hilo"/>
 
40
                </id>
 
41
                
 
42
                <property name="details" 
 
43
                        length="300" 
 
44
                        update="false" 
 
45
                        not-null="true"/>
 
46
                        
 
47
                <property name="version" update="false">
 
48
                        <column name="version" 
 
49
                                not-null="true" 
 
50
                                unique-key="masterVersion"/>
 
51
                </property>
 
52
                
 
53
                <properties name="currentMaster">
 
54
                        <many-to-one name="master">
 
55
                                <column name="cur_master" 
 
56
                                        unique-key="masterVersion" 
 
57
                                        not-null="true"/>
 
58
                        </many-to-one>
 
59
                        <property name="currentVersion" 
 
60
                                not-null="true"/>
 
61
                </properties>
 
62
                
 
63
        </class>
 
64
 
 
65
</hibernate-mapping>
 
 
b'\\ No newline at end of file'