This content has been marked as final.
Show 3 replies
-
1. Re: UPDATE after INSERT in CMR
aloubyansky Mar 23, 2004 1:13 AM (in response to mkyaj)<container-configurations> <container-configuration extends="Standard CMP 2.x EntityBean"> <container-name>INSERT after ejbPostCreate Container</container-name> <insert-after-ejb-post-create>true</insert-after-ejb-post-create> </container-configuration> </container-configurations>
-
2. Re: UPDATE after INSERT in CMR
mkyaj Mar 23, 2004 3:27 PM (in response to mkyaj)Hi,
I think that flag is to specify whether the insert has to be called before ejbPostCreate() or after ejbPostCreate();
Possible values are:
false - the default value, INSERT will be executed after ejbCreate but before
ejbPostCreate;
true - INSERT will be executed after ejbPostCreate.
I tried by changing that to - true. I am getting an exception
javax.ejb.CreateException: Primary key for created instance is null.
Thanks,
Murali. -
3. Re: UPDATE after INSERT in CMR
aloubyansky Mar 29, 2004 4:29 AM (in response to mkyaj)Probably, you are using primary key generation entity-command and the primary key is generated at INSERT time. If so, of course, it won't work.
As a workaround, you could use some entity-command that generates keys before INSERT.
Sorry, but that's the spec.