j***@netscape.net
2003-10-03 12:40:14 UTC
Hi all,
I've generated some entity EJBs with middlegen software. I've set "dataobject=true" and included the "sequenceblock" in the "cmp20" task.
The problem appears when I try to make a create over the entity EJB with the generated dataobject. Because the setData function neither uses the Sequence EJB to get the following ID for the EJB, nor reads the ID from the dataobject, an SQL exception rises:
Fail to add null value in not null attribute ID
because the ID is null (and it's the primary key).
There's no problem if I create the entity passing the parameters instead of passing the dataobject.
Is there any solution?. Do I have to include the PK generation in every create method if I want to create with the dataobject?
Thanks,
Jorge
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
I've generated some entity EJBs with middlegen software. I've set "dataobject=true" and included the "sequenceblock" in the "cmp20" task.
The problem appears when I try to make a create over the entity EJB with the generated dataobject. Because the setData function neither uses the Sequence EJB to get the following ID for the EJB, nor reads the ID from the dataobject, an SQL exception rises:
Fail to add null value in not null attribute ID
because the ID is null (and it's the primary key).
There's no problem if I create the entity passing the parameters instead of passing the dataobject.
Is there any solution?. Do I have to include the PK generation in every create method if I want to create with the dataobject?
Thanks,
Jorge
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455