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

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/batchfetch/ProductLine.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 package="org.hibernate.test.batchfetch">
 
7
 
 
8
<!-- 
 
9
 
 
10
  This mapping demonstrates the use of batch fetching
 
11
  for collections and entities.
 
12
     
 
13
-->
 
14
 
 
15
    <class name="ProductLine" 
 
16
                batch-size="64">
 
17
    
 
18
        <id name="id" 
 
19
                column="productId" 
 
20
                length="32">
 
21
                <generator class="uuid.hex"/>
 
22
        </id>
 
23
        
 
24
        <property name="description" 
 
25
                not-null="true" 
 
26
                length="200"/>
 
27
        
 
28
        <set name="models" 
 
29
                        batch-size="64"
 
30
                        cascade="all"
 
31
                        inverse="true">
 
32
                <key column="productId"/>
 
33
                <one-to-many class="Model"/>
 
34
        </set>
 
35
        
 
36
        </class>
 
37
 
 
38
    <class name="Model" 
 
39
                batch-size="64">
 
40
    
 
41
        <id name="id" 
 
42
                column="modelId" 
 
43
                length="32">
 
44
                <generator class="uuid.hex"/>
 
45
        </id>
 
46
        
 
47
        <property name="name"
 
48
                not-null="true"
 
49
                length="25"/>
 
50
                
 
51
        <property name="description" 
 
52
                not-null="true" 
 
53
                length="200"/>
 
54
        
 
55
        <many-to-one name="productLine" 
 
56
                column="productId"
 
57
                not-null="true"/>
 
58
        
 
59
        </class>
 
60
 
 
61
</hibernate-mapping>