Bill:
   Here's my post from awhile back.  It deals with recursive VOs.  The
problem is that I never found a way to stop the recursion, so if the lineage
was 50 layers deep, then every item in that lineage would be loaded....not
so bueno.
   I don't know if this is the right way, but perhaps it'll serve as a
starting point and maybe someone will jump in and fix it or help it.

cheers!

****snip********
I'm having an issue with defining a CMR on an object that has
children/parents of itself

ie, table form:

 node_id(tsn),  node_name, parent_node_id (parent_tsn)

/**
    * @ejb.interface-method
    * @ejb.relation
    *   name="node-has-children"
    *   role-name="node"
    *   target-ejb="Unit"
    *   target-role-name="children"
    *
    * @jboss.target-relation
    *   related-pk-field="tsn"
    *   fk-column="parent_tsn"
    *
    * @ejb.relation
    *    name="node-has-children"
    *    role-name="children"
    *
     * @ejb.value-object
     *    aggregate="com.foo.UnitValue"
     *    aggregate-name="ChildNode"
     *    members="com.foo.UnitLocal"
     *    members-name="UnitValue"
     *    relation="external"
     *    type="Collection"
     */

  Is this the correct way to do this?  It works.. but it works too well.
Once it loads the children for the object, it continues to load the children
for each of those children, and then the children of all of those
children... until it runs out of data.

  Is the value object the problem?  I'm using aggregate rather than compose,
as the objects aren't responsible for creating each other (this is a static
table).

****snip*****

----- Original Message -----
From: "Bruyn, Bill" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 18, 2003 5:57 PM
Subject: [Xdoclet-user] RE: Recusrive CMR


Anyone?

> -----Original Message-----
> From: Bruyn, Bill
> Sent: Wednesday, June 18, 2003 10:47 AM
> To: [EMAIL PROTECTED]
> Subject: Recusrive CMR
>
> I'm having kind of a tough time trying to figure out how to set up a
> recursive relationship with value objects.  I've found lots of questions
> on the topic in the archives, and elsewhere, but no answers.  Can anyone
> give me a hand?  An example would be great, if it isn't too much trouble.
>
> TIA,
>
>
> Bill
>


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to