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

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/bidi/Auction.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 
 
7
        package="org.hibernate.test.bidi">
 
8
 
 
9
        <class name="Auction" table="TAuction">
 
10
                <id name="id">
 
11
                        <generator class="native"/>
 
12
                </id>
 
13
                <property name="description"/>
 
14
                <property name="end" column="endDatetime"/>
 
15
                <bag name="bids" inverse="true" 
 
16
                                cascade="persist">
 
17
                        <key column="auctionId"/>
 
18
                        <one-to-many class="Bid"/>
 
19
                </bag>
 
20
                <one-to-one name="successfulBid" 
 
21
                                property-ref="abc">
 
22
                        <formula>id</formula>
 
23
                        <formula>1</formula>
 
24
                </one-to-one>
 
25
        </class>
 
26
        
 
27
        <class name="Bid" table="TBid">
 
28
                <id name="id">
 
29
                        <generator class="native"/>
 
30
                </id>
 
31
                <property name="amount" 
 
32
                                scale="19" 
 
33
                                precision="31" />
 
34
                <property name="datetime" 
 
35
                                column="createdDatetime"/>
 
36
                <properties name="abc">
 
37
                        <many-to-one name="item" 
 
38
                                        column="auctionId" 
 
39
                                        cascade="persist"/>
 
40
                        <property name="successful" 
 
41
                                        column="success"/>
 
42
                </properties>
 
43
        </class>
 
44
 
 
45
</hibernate-mapping>