| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE hibernate-mapping
- PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
- <hibernate-mapping auto-import="false" default-cascade="all-delete-orphan" default-lazy="false">
- <class discriminator-value="[magoffin.matt.ieat.domain.Recipe]"
- name="magoffin.matt.ieat.domain.Recipe"
- table="recipe">
- <cache usage="read-write"/>
- <id access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="RecipeId"
- type="org.hibernate.type.LongType"
- unsaved-value="null">
- <column name="recipeid" not-null="true"/>
- <generator class="native"/>
- </id>
- <discriminator formula="'magoffin.matt.ieat.domain.Recipe'"
- type="org.hibernate.type.StringType"/>
- <list access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor"
- lazy="false"
- name="Comment"
- table="Recipe_Comment_">
- <cache usage="read-write"/>
- <key foreign-key="recipecomment_recipe_fk">
- <column name="recipeid"/>
- </key>
- <list-index>
- <column name="pos"/>
- </list-index>
- <one-to-many class="magoffin.matt.ieat.domain.RecipeComment"/>
- </list>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.User"
- foreign-key="recipe_user_fk"
- insert="true"
- name="Owner"
- update="false">
- <column name="ownerid"/>
- </many-to-one>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="Directions">
- <column name="directions"/>
- <type name="text"/>
- </property>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Difficulty"
- foreign-key="recipe_difficulty_fk"
- insert="true"
- name="Difficulty"
- update="true">
- <column name="difficultyid"/>
- </many-to-one>
- <list access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor"
- lazy="false"
- name="Rating"
- table="Recipe_Rating">
- <cache usage="read-write"/>
- <key foreign-key="reciperating_recipe_fk">
- <column name="recipeid"/>
- </key>
- <list-index>
- <column name="pos"/>
- </list-index>
- <one-to-many class="magoffin.matt.ieat.domain.RecipeRating"/>
- </list>
- <list access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor"
- lazy="false"
- name="RelatedRecipe"
- table="Recipe_RelatedRecipe">
- <cache usage="read-write"/>
- <key foreign-key="relatedrecipe_recipe_fk">
- <column name="recipeid"/>
- </key>
- <list-index>
- <column name="pos"/>
- </list-index>
- <one-to-many class="magoffin.matt.ieat.domain.RelatedRecipe"/>
- </list>
- <list access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor"
- lazy="false"
- name="Step"
- table="Recipe_Step">
- <cache usage="read-write"/>
- <key foreign-key="recipestep_recipe_fk">
- <column name="recipeid"/>
- </key>
- <list-index>
- <column name="pos"/>
- </list-index>
- <one-to-many class="magoffin.matt.ieat.domain.RecipeStep"/>
- </list>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="ModifiedDate">
- <column name="modifieddate"/>
- <type name="org.jvnet.hyperjaxb2.runtime.hibernate.type.CalendarType"/>
- </property>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="Image">
- <column length="255" name="image"/>
- <type name="org.hibernate.type.StringType"/>
- </property>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="Source">
- <column length="128" name="source"/>
- <type name="org.hibernate.type.StringType"/>
- </property>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Base"
- foreign-key="recipe_base_fk"
- insert="true"
- name="Base"
- update="true">
- <column name="baseid"/>
- </many-to-one>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.System"
- foreign-key="recipe_system_fk"
- insert="true"
- name="System"
- update="true">
- <column name="systemid"/>
- </many-to-one>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="Name">
- <column length="128" name="recipe_name" not-null="true"/>
- <type name="org.hibernate.type.StringType"/>
- </property>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Ethnicity"
- foreign-key="recipe_ethnicity_fk"
- insert="true"
- name="Ethnicity"
- update="true">
- <column name="ethnicityid"/>
- </many-to-one>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="ServingSize">
- <column name="servingsize" not-null="true"/>
- <type name="org.hibernate.type.IntegerType"/>
- </property>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.PrepTime"
- foreign-key="recipe_preptime_fk"
- insert="true"
- name="PrepTime"
- update="true">
- <column name="preptimeid"/>
- </many-to-one>
- <list access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor"
- lazy="false"
- name="Ingredient"
- table="Recipe_Ingredient">
- <cache usage="read-write"/>
- <key foreign-key="recipeingredient_recipe_fk">
- <column name="recipeid"/>
- </key>
- <list-index>
- <column name="pos"/>
- </list-index>
- <one-to-many class="magoffin.matt.ieat.domain.RecipeIngredient"/>
- </list>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="Excerpt">
- <column name="excerpt"/>
- <type name="text"/>
- </property>
- <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
- name="CreatedDate">
- <column name="createddate"/>
- <type name="org.jvnet.hyperjaxb2.runtime.hibernate.type.CalendarType"/>
- </property>
- <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Course"
- foreign-key="recipe_course_fk"
- insert="true"
- name="Course"
- update="true">
- <column name="courseid"/>
- </many-to-one>
- <subclass discriminator-value="magoffin.matt.ieat.domain.Recipe"
- name="magoffin.matt.ieat.domain.impl.RecipeImpl"/>
- </class>
- </hibernate-mapping>
|