Bugs item #630665, was opened at 2002-10-29 21:32
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=630665&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Leon Doud (ldoud)
Assigned to: Nobody/Anonymous (nobody)
Summary: CMR within one transaction

Initial Comment:
When two objects are created in the same transaction 
setting a relation between these objects fails.  There is 
no exception given, but the foreign key is NULL.

The test case submitted uses one session bean with 
two almost identical methods.  The only difference is 
that one method has the transaction type of "Required" 
and the other has a type of "NotSupported".  The test 
case for the required transaction fails, while the other 
test case passes.

This test only covers one-to-many bidirectional 
relationships.  It was tested against the latest CVS code 
for Branch_3_0, using Windows 2000 and JDK 1.4.0.



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

>Comment By: Alexey Loubyansky (loubyansky)
Date: 2002-11-08 23:50

Message:
Logged In: YES 
user_id=543482

I don't understand why it works for NotSupported.
The problem is that, you are using 'int' for primary key with 
zero value.
Currently, foreign keys can't be 'NOT NULL'. On the other 
hand, 'int' can't be null, so null equivalent is 0. Thus, 
relationships are not set.

Try the following:
1. use int for pk but non-zero values;
2. use java.lang.Integer instead of int.

alex

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

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


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to