Adrian Sampaleanu wrote:
I'm trying to use the latest 1.3 snapshot from CVS and attempting to use
the @hibernate.key tag (I'd like to follow the depracation warnings and
move away from the @hibernate.collection-* tags). I want to specify
additional column details with a @hibernate.column tag, but that
generates a mapping file where all elements of the mapping have an inner
column element with the name "WORK_ITEM_ID".
This is the javadoc:
/**
* @hibernate.list table="DEPENDENTS"
* cascade="save-update"
* lazy="true"
* @hibernate.key column="WORK_ITEM_ID"
* @hibernate.column name="WORK_ITEM_ID"
* length="32"
* @hibernate.index column="LIST_INDEX"
* @hibernate.many-to-many
class="com.tirawireless.common.model.work.AbstractWorkItem"
* column="DEPENDENT_WORKITEM_ID"
*/
and this is the generated output mapping:
<list name="dependentsInternal" table="DEPENDENTS" lazy="true"
cascade="save-update">
<key column="WORK_ITEM_ID">
<column name="WORK_ITEM_ID" length="32" />
</key>
<index column="LIST_INDEX">
<column name="WORK_ITEM_ID" length="32" />
</index>
<many-to-many
class="com.tirawireless.common.model.work.AbstractWorkItem"
column="DEPENDENT_WORKITEM_ID">
<column name="WORK_ITEM_ID" length="32" />
</many-to-many>
</list>
Is this a known issue? In the documentation generated from the snapshot,
the @hibernate.key column attribute says this: "The name of the foreign
key column. This may also be specified by nested @hibernate.column
tag(s)". What exactly does "nested" hibernate.column mean? How should I
specify some column specifics for just one column?
Hi Adrian,
Yes, it's an issue :-). If you could file a bug report in Jira for me
it would help (along with the example you give above).
At the moment I'm unsure how to handle a case like this, if you have any
opinion on how it ought to work, I'm all ears. The basic problem is,
any of the index, many-to-many, and key elements support a nested column
attribute ... so when a user puts @hibernate.column in the javadoc, how
to determine which element the column belongs to?
If you have any spare cycles, I'd love to know if and how XD2 handles
this situation; I haven't had time to take a look.
Paul
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user