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

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: frederik sauer (fredsa)
Assigned to: Nobody/Anonymous (nobody)
Summary: FK not populated with CMR

Initial Comment:
The below example worked in 3.0.0beta2 and no longer 
works in RC1.



Steps to reproduce:

1. Create two entity beans, "Parent" and "Child", 
each with a Long primary key (say "parentId" and 
childId")

2. Create bi-directional CMR parent-childeren using a 
Collection

3. Create a remotely accessible method in the Parent 
bean: public void addChildByPK(Long childPK)

3. Create a remotely accessible method in the Child 
bean: public void setParentByPK(Long parentPK)

4. In a test client show that this works as it should:
a) create an instance of Parent
b) create an instance of Child
c) call parent.addChildByPK((Long) child.getPrimaryKey
())
d) select * from the child table and verify that the 
foreign key to the parent entity is populated

5. In a test client show that this is broken:
a) create an instance of Parent
b) create an instance of Child
c) call child.setParentByPK((Long) 
parent.getPrimaryKey())
d) select * from the child table and verify that the 
foreign key to the parent entity is null


I'm attaching a JAR file (includes source) which can 
be deployed. Included in the jar is a test client 
RelationshipTest.java. All files are in the java 
package "dummy".

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

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

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to