Menu

#78 VO exclude and CMRs

open
None
5
2002-07-17
2002-07-17
No

Yes, I believe it was "entity-value.j".
Make the changes and try rebuilding XDoclet.

----- Original Message -----
From: Peter Zhou
To: 'scknight2@hotmail.com'
Sent: Tuesday, July 16, 2002 2:30 PM
Subject: Re: [Xdoclet-user] Exclude relation from
ValueObject?

Steve,

Which file did you modify?

I have the same problem: I want to remove one
CMR field from the value object. But seems xdoclet
always processes the first @ejb:value-object only.

I modified this 'entity-value.j' which my ant task
uses, but I still get 3 valueobject java files with the same
cmr fields.

Do I need to recompile the xdoclet?

Thanks,

Peter

This is my xdoclet tags:

/**

* @return A ConfigurationValueBeanLocal references.

*

* @ejb:interface-method view-type="local"

*

* @ejb:value-object

* match="normal"

* type="java.util.Collection"

* relation="external"

*
compose="com.abc.model.data.config.common.vo.Confi
gurationValueValue"

* compose-name="ConfigurationValueValue"

*
members="com.abc.model.data.config.common.Configur
ationValueBeanLocal"

* members-name="ConfigurationValue"

*

* @ejb:value-object match="light" exclude="true"

*

*

* @ejb:relation

* name="configurationvalue-configurationgroup"

* role-name="configurationgroup-has-many-
configurationgroupvalues"

* cascade-delete="no"

*/

public abstract java.util.Collection
getConfigurationValues();

/**

* @ejb:interface-method view-type="local"

*/

public abstract void setConfigurationValues(
java.util.Collection

configurationValues );

=========================================

Re: [Xdoclet-user] Exclude relation from ValueObject?

--------------------------------------------------------------------------------

From: Steve Knight

Subject: Re: [Xdoclet-user] Exclude relation from
ValueObject?

Date: Mon, 08 Apr 2002 10:55:10 -0700

--------------------------------------------------------------------------------

I found the problem...Simple bug to fix.

This line:

<XDtEjbValueObj:forAllAggregates superclasses="true"

valueobject="<XDtEjbValueObj:valueObjectMatch/>">

Should be replaced with:

<XDtEjbValueObj:forAllAggregates superclasses="true"

valueobject="<XDtEjbValueObj:currentValueObjectMatch
/>">

Steve

----- Original Message -----

From: Steve Knight

To: xdoclet-user@lists.sourceforge.net

Sent: Monday, April 08, 2002 12:35 PM

Subject: Re: [Xdoclet-user] Exclude relation from
ValueObject?

Ok, the latest patch seems to have solved part of this
problem, but not

all. Unless I am using it incorrectly.

The value objects themselves are created correctly, but I
now get errors in

the code for the CMP class. Specifically, in
the "setWhateverLightValue( )"

method. Even if I excluded a certain CMR field from
my "LightValue" object,

this method still tries to manipulate the collection for the
relation.

I think the problem might only affects 1-n relationships.

Steve

----- Original Message -----

From: Steve Knight

To: xdoclet-user@lists.sourceforge.net

Sent: Tuesday, April 02, 2002 5:47 PM

Subject: [Xdoclet-user] Exclude relation from
ValueObject?

Hello,

I am trying to create 2 different ValueObjects for an
entity: "NormalValue"

and "LightValue".

I would like to exclude a certain cmr field from showing
up in the

LightValue, but have it still exist in the NormalValue.

I have looked at the examples and tried using:

* @ejb:value-object match="light" exclude="true"

But this does not appear to be working and both value
objects still contain

the cmr field.

Am I missing something obvious?

Thanks,

Steve

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.