Hi,

I'm using CMP 2.0 entity beans with CMR's and XDoclet 1.2.0's value object
feature. I'm having a problem with XDoclet's implementation of the
setValue(blaVO) method in the generated CMP class. setValue() tries to set
a) all CMP fields and b) all CMR fields.

Trying to use setValue() in ejbCreate gets me into trouble because of this
behavior. I know that CMR fields need to be set in ejbPostCreate instead of
ejbCreate. However, I can't simply set only the primary key field in
ejbCreate and set the rest of the CMP fields together with the CMR fields in
ejbPostCreate since I have certain NOT NULL columns in the database.

Calling setValue() in ejbCreate gets me into trouble with the appserver
(JBoss) because setValue() tries to set CMR fields in ejbCreate then.
Calling setValue() in ejbPostCreate also gets me into trouble because the
database complains about NOT NULL constraint violations.

Has anybody else ever had these kinds of problems or is there another way to
solve this. As I see it right now, I need to alter the entitycmp-template
and split setValue up in two methods, one for setting CMP fields, and one
for setting CMR fields.

Cheers
Bernhard


 

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only.  It may contain proprietary material, confidential information and/or be subject 
to legal privilege.  It should not be copied, disclosed to, retained or used by, any 
other party.  If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender.  Thank you.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to