RecipeIngredient.hbm.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE hibernate-mapping
  3. PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
  4. <hibernate-mapping auto-import="false" default-cascade="all-delete-orphan" default-lazy="false">
  5. <class discriminator-value="[magoffin.matt.ieat.domain.RecipeIngredient]"
  6. name="magoffin.matt.ieat.domain.RecipeIngredient"
  7. table="recipeingredient">
  8. <cache usage="read-write"/>
  9. <id access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
  10. name="Hjid"
  11. type="org.hibernate.type.LongType"
  12. unsaved-value="null">
  13. <column name="recipeingredientid" not-null="true"/>
  14. <generator class="native"/>
  15. </id>
  16. <discriminator formula="'magoffin.matt.ieat.domain.RecipeIngredient'"
  17. type="org.hibernate.type.StringType"/>
  18. <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
  19. name="Optional">
  20. <column name="optional" not-null="true"/>
  21. <type name="org.hibernate.type.BooleanType"/>
  22. </property>
  23. <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Ingredient"
  24. foreign-key="recipeingredient_ingredient_fk"
  25. insert="true"
  26. name="Ingredient"
  27. update="true">
  28. <column name="ingredientid"/>
  29. </many-to-one>
  30. <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Recipe"
  31. foreign-key="recipeingredient_ingredientrecipe_fk"
  32. insert="true"
  33. name="Recipe"
  34. update="true">
  35. <column name="ingredientrecipeid"/>
  36. </many-to-one>
  37. <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
  38. name="Quantity">
  39. <column name="quantity" not-null="true"/>
  40. <type name="org.hibernate.type.DoubleType"/>
  41. </property>
  42. <property access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.CheckingPropertyAccessor"
  43. name="Qualifier">
  44. <column length="255" name="qualifier"/>
  45. <type name="org.hibernate.type.StringType"/>
  46. </property>
  47. <many-to-one cascade="none" class="magoffin.matt.ieat.domain.Unit"
  48. foreign-key="recipeingredient_unit_fk"
  49. insert="true"
  50. name="Unit"
  51. update="true">
  52. <column name="unitid"/>
  53. </many-to-one>
  54. <subclass discriminator-value="magoffin.matt.ieat.domain.RecipeIngredient"
  55. name="magoffin.matt.ieat.domain.impl.RecipeIngredientImpl"/>
  56. </class>
  57. </hibernate-mapping>