RecipeImpl.hbm.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE hibernate-mapping PUBLIC
  3. "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
  4. "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
  5. <hibernate-mapping
  6. auto-import="false"
  7. >
  8. <class
  9. name="magoffin.matt.ieat.domain.impl.RecipeImpl"
  10. table="Recipe"
  11. >
  12. <cache usage="read-write" />
  13. <id
  14. name="recipeId"
  15. column="recipeId"
  16. type="java.lang.Integer"
  17. unsaved-value="null"
  18. >
  19. <generator class="native">
  20. <param name="sequence">recipe_id_seq</param>
  21. <!--
  22. To add non XDoclet generator parameters, create a file named
  23. hibernate-generator-params-RecipeImpl.xml
  24. containing the additional parameters and place it in your merge dir.
  25. -->
  26. </generator>
  27. </id>
  28. <many-to-one
  29. name="owner"
  30. class="magoffin.matt.ieat.domain.impl.UserImpl"
  31. cascade="none"
  32. outer-join="auto"
  33. update="true"
  34. insert="true"
  35. column="owner"
  36. />
  37. <property
  38. name="image"
  39. type="java.lang.String"
  40. update="true"
  41. insert="true"
  42. column="image"
  43. length="255"
  44. />
  45. <property
  46. name="excerpt"
  47. type="text"
  48. update="true"
  49. insert="true"
  50. column="excerpt"
  51. not-null="true"
  52. />
  53. <property
  54. name="source"
  55. type="java.lang.String"
  56. update="true"
  57. insert="true"
  58. column="source"
  59. length="64"
  60. />
  61. <many-to-one
  62. name="course"
  63. class="magoffin.matt.ieat.domain.impl.CourseImpl"
  64. cascade="none"
  65. outer-join="auto"
  66. update="true"
  67. insert="true"
  68. column="course"
  69. />
  70. <many-to-one
  71. name="system"
  72. class="magoffin.matt.ieat.domain.impl.SystemImpl"
  73. cascade="none"
  74. outer-join="auto"
  75. update="true"
  76. insert="true"
  77. column="system"
  78. />
  79. <property
  80. name="directions"
  81. type="text"
  82. update="true"
  83. insert="true"
  84. column="directions"
  85. />
  86. <many-to-one
  87. name="base"
  88. class="magoffin.matt.ieat.domain.impl.BaseImpl"
  89. cascade="none"
  90. outer-join="auto"
  91. update="true"
  92. insert="true"
  93. column="base"
  94. />
  95. <many-to-one
  96. name="prepTime"
  97. class="magoffin.matt.ieat.domain.impl.PrepTimeImpl"
  98. cascade="none"
  99. outer-join="auto"
  100. update="true"
  101. insert="true"
  102. column="prepTime"
  103. />
  104. <many-to-one
  105. name="ethnicity"
  106. class="magoffin.matt.ieat.domain.impl.EthnicityImpl"
  107. cascade="none"
  108. outer-join="auto"
  109. update="true"
  110. insert="true"
  111. column="ethnicity"
  112. />
  113. <property
  114. name="createdDate"
  115. type="java.util.Calendar"
  116. update="true"
  117. insert="true"
  118. column="createdDate"
  119. not-null="true"
  120. />
  121. <property
  122. name="servingSize"
  123. type="java.lang.Integer"
  124. update="true"
  125. insert="true"
  126. column="servingSize"
  127. not-null="true"
  128. />
  129. <property
  130. name="name"
  131. type="java.lang.String"
  132. update="true"
  133. insert="true"
  134. column="name"
  135. length="128"
  136. not-null="true"
  137. />
  138. <property
  139. name="modifiedDate"
  140. type="java.util.Calendar"
  141. update="true"
  142. insert="true"
  143. column="modifiedDate"
  144. />
  145. <many-to-one
  146. name="difficulty"
  147. class="magoffin.matt.ieat.domain.impl.DifficultyImpl"
  148. cascade="none"
  149. outer-join="auto"
  150. update="true"
  151. insert="true"
  152. column="difficulty"
  153. />
  154. <list
  155. name="commentInternal"
  156. table="Recipe_CommentInternal"
  157. lazy="false"
  158. cascade="all-delete-orphan"
  159. where="CommentInternal_index is not null"
  160. >
  161. <key
  162. column="RecipeImpl_id"
  163. >
  164. </key>
  165. <index
  166. column="CommentInternal_index"
  167. />
  168. <one-to-many
  169. class="magoffin.matt.ieat.domain.impl.RecipeCommentImpl"
  170. />
  171. </list>
  172. <list
  173. name="relatedRecipeInternal"
  174. table="Recipe_RelatedRecipeInternal"
  175. lazy="false"
  176. cascade="all-delete-orphan"
  177. where="RelatedRecipeInternal_index is not null"
  178. >
  179. <key
  180. column="RecipeImpl_id"
  181. >
  182. </key>
  183. <index
  184. column="RelatedRecipeInternal_index"
  185. />
  186. <one-to-many
  187. class="magoffin.matt.ieat.domain.impl.RelatedRecipeImpl"
  188. />
  189. </list>
  190. <list
  191. name="stepInternal"
  192. table="Recipe_StepInternal"
  193. lazy="false"
  194. cascade="all-delete-orphan"
  195. where="StepInternal_index is not null"
  196. >
  197. <key
  198. column="RecipeImpl_id"
  199. >
  200. </key>
  201. <index
  202. column="StepInternal_index"
  203. />
  204. <one-to-many
  205. class="magoffin.matt.ieat.domain.impl.RecipeStepImpl"
  206. />
  207. </list>
  208. <list
  209. name="ingredientInternal"
  210. table="Recipe_IngredientInternal"
  211. lazy="false"
  212. cascade="all-delete-orphan"
  213. where="IngredientInternal_index is not null"
  214. >
  215. <key
  216. column="RecipeImpl_id"
  217. >
  218. </key>
  219. <index
  220. column="IngredientInternal_index"
  221. />
  222. <one-to-many
  223. class="magoffin.matt.ieat.domain.impl.RecipeIngredientImpl"
  224. />
  225. </list>
  226. <list
  227. name="ratingInternal"
  228. table="Recipe_RatingInternal"
  229. lazy="false"
  230. cascade="all-delete-orphan"
  231. where="RatingInternal_index is not null"
  232. >
  233. <key
  234. column="RecipeImpl_id"
  235. >
  236. </key>
  237. <index
  238. column="RatingInternal_index"
  239. />
  240. <one-to-many
  241. class="magoffin.matt.ieat.domain.impl.RecipeRatingImpl"
  242. />
  243. </list>
  244. <!--
  245. To add non XDoclet property mappings, create a file named
  246. hibernate-properties-RecipeImpl.xml
  247. containing the additional properties and place it in your merge dir.
  248. -->
  249. </class>
  250. </hibernate-mapping>