|
Hi, First off, I would like to say I'm impressed with the
tool - it's very elegant. :-) I'm using XDoclet
1.2.0-beta1 with Ant 1.5.1, JBoss 3.0.1 and JDK
1.4.1. My CMP Entity EJBs have
one-to-many and many-to-many CMR relationships with other ejbs. I'm using @ejb:value-object tags with aggregation to pass data in
and out, and would like to define two types of value-object per ejb: one with the related entities, and the other without: ... * @ejb.value-object * match="light" * name="Aircraft" * @ejb.value-object * match="normal" * name="AircraftComplete" ... The cmr relation
value-object definitions then only specify match="normal", so the
'light' value-object does not include the related data: ... *
@ejb.value-object
* aggregate="net.adamcc.planeres.interfaces.OwnerValue"
* aggregate-name="OwnerView"
*
match="normal"
* members="net.adamcc.planeres.interfaces.OwnerLocal"
* members-name="Owner"
* relation="external"
* type="java.util.Collection" ... Everything generates without error, and the 'light'
value-objects (correctly) do not include the data from the related entities,
but then the compile falls over with the following error messages: [javac]
Compiling 32 source files to C:\Projects\planeRes\build\classes [javac]
C:\Projects\planeRes\build\generate\net\adamcc\planeres\entity\AircraftCMP.java:165:
cannot resolve symbol [javac]
symbol : method getAddedOwnerViews
() [javac]
location: class net.adamcc.planeres.interfaces.AircraftValue [javac]
java.util.Iterator iOwnerView
= valueHolder.getAddedOwnerViews().iterator(); [javac]
^ [javac]
C:\Projects\planeRes\build\generate\net\adamcc\planeres\entity\AircraftCMP.java:171:
cannot resolve symbol [javac]
symbol : method getRemovedOwnerViews
() [javac]
location: class net.adamcc.planeres.interfaces.AircraftValue [javac]
iOwnerView = valueHolder.getRemovedOwnerViews().iterator(); [javac] ^ ... It seems the generated 'light' setAircraftValue
method in OwnerCMP (wrongly)
includes the code for extracting the related data out of AircraftValue,
even though these are not part of the 'light' value objects. (The 'normal' value object AircraftCompleteValue does include the related data, and
the generated method setAircraftCompleteValue
correctly extracts these). As far as I can see, everything else is generated
correctly. I did try going to 1.1.2, but unfortunately the 'match'
handling there does not seem to be fully implemented, and the Collections are
included in all the value-objects. Am I doing something wrong? What have I misunderstood? Thanks in advance for your help. Adam Crowther |
