Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
JBossAS-3.2.6 Final
-
None
Description
SourceForge Submitter: juanmartinez .
Hi.
I've 3 entities which are in the following relationship:
A 1 <>- * B * -> 1 C
and a method in session facade which creates a A entity and a lot
of B entities. The C entities exists before the facade method is
called.
What happens is this:
1) A is created
2) Another method is called which creates B's with different
properties (and sub-methods)
3) The B is created with a reference to C (set is called in
ejbPostCreate)
4) The newly created B's are then assigned to A
All tx attributes are set to "Required" in case of a failure
somewhere under the creation.
Inside the facade tx I can see that all B's has a reference to C.
When the facade method completes a check to the database
shows that only the last B's reference to C is set.
That is:
During facade tx (bean level):
B1 -> C1
B2 -> C1
After facade tx (and in database):
B1 -> NULL
B2 -> C1
A find call after the facade method shows this as well (b1.getC()
== null && b2.getC() != null). CMP fields are fine in both cases.
The A <-> B relationships are fine.
All primary keys in A, B, and C are based on PostgreSQL
sequences. The reference between the entities are based on
sql-/jdbc-type INTEGER.
The tests have been run on 3.2.6RC1 and 4.0.0RC1 – not the
branches, sorry. I searched the closed bug reports for 3.2.6RC2
couldn't a match for this case.
The container is run with default setup (COMMIT B).
I can try and make a testcase if needed – the original code
creates 1000's of entities and have a lot more dependencies.
Let me know if I can provide more information.
Juan