-
1. Re: List of enum types is possible?
copyrightwitness Oct 18, 2006 12:01 PM (in response to ajaleo)I don't know about the annotations but I am currently trying this...
* @hibernate.list
* cascade="all-delete-orphan"
* lazy="true"
* table="Options"
* embed-xml="true"
* @hibernate.list-index
* column="listIndex"
* @hibernate.key
* column="ParentId"
* @hibernate.element
* ype="MyEnumUserType"
* column="myEnum"
which produced the following out of XDocLet:
<list table="Options" lazy="true" cascade="all-delete-orphan" name="enumProperty" embed-xml="true">
<list-index column="listIndex"/>
The trick appears to be using 'element' rather than one-to-many or some such mapping. It certainly produces the correct DDL.
Hope this helps,
Barry -
2. Re: List of enum types is possible?
copyrightwitness Oct 18, 2006 12:04 PM (in response to ajaleo)stupid forum! It thinks its html...argh.
<list table="Options" lazy="true" cascade="all-delete-orphan" name="myProperty" embed-xml="true">
<key column="myEnumFieldname"/>
<list-index column="listIndex"/>
<element type="MyEnumUserType" column="option"/>
</list>
That should work better! -
3. Re: List of enum types is possible?
copyrightwitness Oct 18, 2006 12:04 PM (in response to ajaleo)oh pooo. You get the idea anyway!
-
4. Re: List of enum types is possible?
peterj Oct 18, 2006 12:27 PM (in response to ajaleo)To get the forum to display what you want, surround your code with [ code ] ... [ /code ] brackets (without the spaces). Or select your code and click on the Code button above the edit text box (don't use the "Instant Reply" text box, lcick on Post Reply instead).