Hi,
This is a bug recently discovered and fixed by Bill Burke. I think the fix
made it into 2.4. I don't remember all the details, I think he fixed this
specific case, although his original problem involved posting modifications
before calling a finder. for more info, check the bug tracker and the dev
mailing list archives.
david jencks
On 2001.06.26 04:51:16 -0400 Remus Jivcu wrote:
> Hi,
>
> I have following scenario : two CMP entity beans (EntityA - id (PK),
> entityBId (FK in EntityB); EntityB - id (PK)) and one stateless session
> bean. As a DB I use Oracle. Between EntityA and EntityB tables there is
> set a normal Oracle constraint.
>
> In one doTest() method in my session bean I do the folowing (all things
> are happening in one transaction) : reassign entityB reference for one
> entityA and then remove entityB that is not used anymore.
>
> Very simplified code would look like this :
> ...
> entityA.setEntityBId(newValueForEntityBId);
> entityB.remove();
> ...
>
> where, of course, entityB is the corresponding entity for old value
> referrenced in entityA. In this point I get an Oracle integrity
> constraint error. Looking to JAWS log I see that first JBoss tries to
> delete, and after that to update (I can see this if I remove db
> constraint). And, I guess, this behaviour is also normal, an
> optimization issue probably, to update everything is needed at the end
> of transaction, not after each setField() method invoked.
> But, in this scenario, this behaviour it's not fit for me.
>
> So, finally, question is : how can I force updates before deletes (with
> db constraint on, and in one transaction) ?
>
> I'm using : Windows NT 4.0, JDK 1.3.1, JBoss 2.2.1-Tomcat, Oracle DB.
> Stack trace and source files are pretty useless for this simple
> scenario.
>
> Thank you in advance,
>
> Remus.
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user