java/nekurak.net-ejb/src/conf/Podnik.hbm.xml
author František Kučera <franta-hg@frantovo.cz>
Fri, 14 Jan 2011 18:49:43 +0100
changeset 167 21fa832b26aa
parent 164 e146e2e3b80b
child 173 2b458ac09044
permissions -rw-r--r--
posunutí fotek k pravému okraji
franta-hg@28
     1
<?xml version="1.0"?>
franta-hg@28
     2
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
franta-hg@28
     3
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
franta-hg@28
     4
<hibernate-mapping>
franta-hg@145
     5
	<class name="cz.frantovo.nekurak.dto.Podnik" table="podnik">
franta-hg@145
     6
		<id name="id" column="id" type="integer">
franta-hg@145
     7
			<generator class="sequence">
franta-hg@145
     8
				<param name="sequence">podnik_seq</param>
franta-hg@145
     9
			</generator>
franta-hg@145
    10
		</id>
franta-hg@145
    11
		<property name="nazev" column="nazev"/>
franta-hg@145
    12
		<property name="popis" column="popis"/>
franta-hg@145
    13
		<property name="url" column="url"/>
franta-hg@145
    14
		<property name="datum" column="datum"/>
franta-hg@145
    15
		<property name="ulice" column="ulice"/>
franta-hg@145
    16
		<property name="cisloPopisne" column="cislo_popisne"/>
franta-hg@145
    17
		<property name="mesto" column="mesto"/>
franta-hg@145
    18
		<property name="spravce" column="spravce"/>
franta-hg@145
    19
		<list name="fotky" table="fotka" lazy="false">
franta-hg@145
    20
			<key column="podnik" foreign-key="id"/>
franta-hg@145
    21
			<list-index column="poradi"/>
franta-hg@145
    22
			<one-to-many class="cz.frantovo.nekurak.dto.Fotka"/>
franta-hg@145
    23
		</list>
franta-hg@159
    24
		<set name="komentare" table="komentar" lazy="false" order-by="id DESC">
franta-hg@145
    25
			<key column="podnik" foreign-key="id"/>
franta-hg@145
    26
			<one-to-many class="cz.frantovo.nekurak.dto.Komentar"/>
franta-hg@145
    27
		</set>
franta-hg@154
    28
		<set name="kategorie" table="podnik_kategorie" lazy="false">
franta-hg@154
    29
			<key column="podnik"/>
franta-hg@154
    30
			<many-to-many class="cz.frantovo.nekurak.dto.Kategorie" column="kategorie" order-by="nazev"/>
franta-hg@154
    31
		</set>
franta-hg@145
    32
		<property name="sirka" column="sirka"/>
franta-hg@145
    33
		<property name="delka" column="delka"/>
franta-hg@164
    34
		<many-to-one name="kurackost" column="kurackost" not-null="true"/>
franta-hg@145
    35
	</class>
franta-hg@28
    36
</hibernate-mapping>