|
Hi,
I'm new to XDoclet and probably
still making newbie errors everywhere.
I'm testing XDoclet features,
and making a simple test application with only two Entity Beans and a SLSB
"facade". My problem is known as "reference
circularity" between value-objects and is in the list archives,
but I can get the solution working.
I mean, I have a 1:n
relationship between my EJB (PlayerBean and TeamBean), with visibility on both
sides. To avoid the "circularity problem" I have defined two diferent
value-object for the TeamBean, let's say:
* @ejb.value-object
* name="Team" * match="full" * * @ejb.value-object * name="TeamLite" * match="lite" and then I set the "match"
property on every persistant field, like:
/**
* Team's name * * @ejb:interface-method * @ejb:persistent-field * @ejb:value-object * match="*" * @jboss:column-name "NAME" * @jboss:jdbc-type VARCHAR * @jboss:sql-type VARCHAR(50) * * @return the team's name */
public abstract String getNombre (); but, when I declare the
relationship I do it only for the "full" value-object version:
/**
* Team's players * * @ejb:interface-method * type="local" * * @ejb:value-object * match="full" * type="Collection" * aggregate="net.infinitumdoor.test.xdoclet.ejb.PlayerVO" * aggregate-name="Players" * members="net.infinitumdoor.test.xdoclet.ejb.PlayerLocal" * members-name="PlayerVO" * relation="external" * @ejb.relation
* name="TeamsPlayersRelationship" * role-name="ATeamHavePlayers" * */ public abstract Collection getPlayers (); (please note the match="full"
attribute on the value-object tag)
When I generate the source code
using "ant", I the two indetical value-objects TeamVO and TeamLiteVO, and
both of them have the "players" collection... so my circularity problem is still
there.
Why is XDoclet including this
field if I declare match="full"? What am I doing wrong? I have tested almost
everything without finding an answer.
Any kind of help would be
welcomed, and thanks in advance,
Gustavo Comba
PD: please forgive my
English!
|
