I am having a problem getting the composite element feature to work
correctly, specifically the property names in the composite element. I
have searched the net high and low with now luck. Could someone point
out what I am doing wrong? Here is what I have
First I have 2 tables, one table stores the name of a custom column
layout. The detail table stores the columns and the order for that
view.
---------------------------------
| columnView |
---------------------------------
columnViewId (integer) |
programName (char) |
DisplayName (char) |
user (char) |
---------------------------------
---------------------------------
| columnViewDtl |
---------------------------------
columnViewId(FK) (integer) |
columnName (char) |
DisplayName (char) |
order (integer) |
width (integer) |
---------------------------------
the columnView can have 0..* columnViewDtl and from reading the
hibernate book, I thought choosing a composite element would be the
best choice. so i created a regular pojo for columnViewDtl and for
columnView I have the following xdoclet tags
/**
* @hibernate.set
* role="columnViewDetails"
* cascade="all-delete-orphan"
* table="colviewsdtl"
* inverse="false"
* lazy="false"
*
* @hibernate.collection-key column="colViewId"
* @hibernate.collection-composite-element
class="com.wr.adProgram.hibernate.utils.columnViewDetail"
*
* @hibernate.parent name="columnView"
* @hibernate.property
* name="columnName"
* column="columnname"
* not-null="true"
* @hibernate.property
* name="displayName"
* column="displayname"
* not-null="true"
* @hibernate.property
* name="order"
* column="columnOrder"
* not-null="true"
* @hibernate.property
* name="width"
* column="colwidth"
* not-null="false"
*/
the problem is in that i am not getting the property names to go into
the composite element section. Here is what I am getting:
<property
name="columnViewDetails"
type="java.util.Collection"
update="true"
insert="true"
column="columnname"
not-null="true"
/>
<parent name="columnViewDetails" />
<set
name="columnViewDetails"
table="colviewsd"
lazy="false"
inverse="false"
cascade="all-delete-orphan"
sort="unsorted"
>
<key column="colViewId"></key>
<composite-element
class="com.wr.adProgram.hibernate.utils.columnViewDetail"
>
</composite-element>
</set>
am i missing something or not writing the tags correctly? I appreciate
your time and thanks in advance.
--
Mel Haynes Jr
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user