Bugs item #549415, was opened at 2002-04-27 02:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=549415&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Dirk Bogun (dshogun)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: Error create Entity EJB with foreign key

Initial Comment:
I think there is a bug in the CMP in jboss Version 3.0 
RC1. I'am using MySQL 3.23.49a-max (InnoDB) under 
Linux with kernel 2.4.10, suns jdk 1.3.1-b24.

I want to create an entity EJB, which has two foreign 
keys declared into the Database (associations to other 
classes). I placed the setter for the both foreign 
keys into the ejbPostCreate method. Befor the setter 
can work, that means ejbPostCreate can run, the INSERT 
INTO ... command in ejbCreate is sending to the DB and 
I get an exception, that the row can not be added into 
the Database, because a foreign key constraint fails, 
what ist true, because the two foreign keys are still 
empty.

When I put the setter into ejbCreate, than an 
exception occurs, saying that I have to place CMR 
setter into ejbPostCreate.

Under Bea Weblogic Server 6.1 my code works fine, so I 
think it is a bug in jboss.

greetings

Dirk Bogun





----------------------------------------------------------------------

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-05-13 23:24

Message:
Logged In: YES 
user_id=251431

JBossCMP inserts the row into the database between 
ejbCreate and ejbPostCreate. The ejb spec does not allow 
you to modify a relationship until ejbPostCreate, so when 
the row is initially inserted it all of the foreign keys 
will be null.  This restriction will be removed in JBoss 
3.1.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=549415&group_id=22866

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to