Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 0.9.4
-
Fix Version/s: 1.3.1
-
Component/s: JDO queries
-
Labels:None
-
Environment:Operating System: Windows 2000
Platform: PC
-
Bugzilla Id:1160
Description
When I try to set up a parent/child relationship using jdo, the id for the
child object isn't stored in the parent's table like I would expect it to, but
only when I use key-generator in the mapping for the child class. If I were to
generate the id for the child class in code, it saves it to the parent's
related_id field fine. I think that the id isn't being generated for the child
class before the save for the parent class takes place and so there is no id to
save in the field, which is why it works if I generate the id in code. I'm
doing the saves in what I think are different transactions so I can't see how
the id for the child isn't already generated (the child is saved fine).
I will attach a file in a minute that has the JUnit test, mapping and database
files in it so you can see how I'm doing this.
Created an attachment (id=202)
Jar with unit test to reproduce the bug.