Konstantin Priblouda wrote:

--- Donovan Thatcher <[EMAIL PROTECTED]> wrote:


Hi

Hoping that this can be answered here, and not on a
hibernate list.

I have a mapping table that provides a many-to-many
relationship between two other tables. To map a List of children from the one table's entity mapping, I use the following hibernate .hbm.xml
mapping :

  <list name="children"
table="eship_charge_mappings">
      <key column="parentId"/>
      <index column="id"/>
      <many-to-many column="childId"
class="com.eship.dao.entity.Charge"/>
  </list>

How would I represent this using XDoclet's
@2hibernate associations?

#

If you would use XDoclet 2 hibernate plugin you would
write somethig like this:
@hibernate.list table="bla" lazy="..." cascade="..."
@hibernate.key column="parentId"
@hibernate.index column="id"
@hibernate.many-to-many column="" class=""

If you prefer XD1 , you will have to add prepend
collection- everywhere but on list.
( XD2 can be found here: http://xdoclet.codehaus.org )



The latest CVS snapshot (and next to-be-determined stable release) does not require the collection- prefix any more, but still supports it. Hopefully this will help up coordinate on a smooth transition to XD2 for most users.

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
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to