java/nekurak.net-ejb/src/conf/Podnik.hbm.xml
author František Kučera <franta-hg@frantovo.cz>
Sun, 14 Mar 2010 01:05:35 +0100
changeset 67 fa7e30dee3b3
parent 63 619b0d3732eb
child 69 4964cf581166
permissions -rw-r--r--
Hibernate: jednoduché mapování podniků a fotek (1:N).
     1 <?xml version="1.0"?>
     2 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
     3 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
     4 <hibernate-mapping>
     5     <class name="cz.frantovo.nekurak.dto.Podnik" table="podnik">
     6 	<id name="id" column="id" type="integer">
     7 	    <generator class="sequence">
     8 		<param name="sequence">podnik_seq</param>
     9 	    </generator>
    10 	</id>
    11 	<property name="nazev" column="nazev"/>
    12 	<property name="popis" column="popis"/>
    13 	<property name="url" column="url"/>
    14 	<property name="datum" column="datum"/>
    15 	<property name="ulice" column="ulice"/>
    16 	<property name="cisloPopisne" column="cislo_popisne"/>
    17 	<property name="mesto" column="mesto"/>
    18 	<property name="spravce" column="spravce"/>
    19 	<set name="fotky" table="fotka" lazy="true">
    20 	    <key column="podnik" foreign-key="id"/>
    21 	    <one-to-many class="cz.frantovo.nekurak.dto.Fotka"/>
    22 	</set>
    23 
    24     </class>
    25 </hibernate-mapping>