Hello,
I'm using XDoclet to generate my value objects, and I'm having trouble with the 
compose tags.
The scenario is as follows: I have a Country entity bean, and a State entity bean. A 
Country can have many states.
In the DB, I have a foreign key on the states table, and the foreign key is setted up 
as not-null (required by the DB team).
On the Country class, I'm using tags such as:
@ejb.value-object
        compose = "test.ejb.StateValue"
        compose-name = "StateValue"

When I generate the CMP classes, I get a bunch of methods, such as addState(StateValue 
v).
I would really like to use the addState method, however that method creates a state, 
and only after it, it adds it to the states collection on my country bean. This causes 
the not-null FK to throw an exception.

Is there any workaround for this?
I'd really like to keep using the generated code from XDoclet, and I cannot give up on 
the not-null FK for now.

Thanks in advance!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837077#3837077

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837077



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to