jdo - Prepared statement parameter not being set in DataNucleus -


After

I am trying to insert an employee object using the database DataNucleus 2.1.1, but the foreign key position parameter Is not being set before the "insert" statement. What am I doing that prevents the parameter from being set? Is there something I am missing? Reading works fine

  Debug [DataNucleus.Datastore.Native] - inserting in MYSCHEMA.EMPLOYEE ("NAME", POSITION_ID, ID) values ​​(. & Lt; 'John Do' & gt; ; & Lt; dirty & gt; & lt; 100 & gt;) Warning [DataNucleus.Datastore.Persist] - Insert the object "com.example.staff.Employee@50 7895d8" to use the statement "MYSCHEMA.EMPLOYEE" "NAME", POSITION_ID, id) value (??,) "failed: Invalid Action: Parameter 2 Set not available or registered PersistenceManager = // Received status by receiving PersistenceManager Status Status = // pm Employee Employee = New employees Ri (I can request post the code on) (100 "John Doe", status); Pm.makePersistent (employee); Pm.close (); & Lt; JDO & gt; & Lt; Package name = "com.example.staff" & gt; & Lt; Class name = "status" identity-type = "application" schema = "mesachamema" table = "status" & gt; & Lt; Heritage Strategy = "New-Table" /> & Lt; Field name = "id" primary key = "true" persistent = "constant" default-fetch-group = "true" & gt; & Lt; Column name = "id" jdbc-type = "integer" /> & Lt; / Region & gt; & Lt; Field name = "title" persistent = "continuous" default-fetch-group = "true" & gt; & Lt; Column name = "TITLE" jdbc-type = "varchar" /> & Lt; / Region & gt; & Lt; / Square & gt; & Lt; / Package & gt; & Lt; / JDO & gt; & Lt; JDO & gt; & Lt; Package name = "com.example.staff" & gt; & Lt; Class name = "employee" identity-type = "application" schema = "mesachamema" table = "employee" & gt; & Lt; Heritage Strategy = "New-Table" /> & Lt; Field name = "id" primary key = "true" persistent = "constant" default-fetch-group = "true" & gt; & Lt; Column name = "id" jdbc-type = "integer" /> & Lt; / Region & gt; & Lt; Field name = "name" persistent = "constant" default-fetch-group = "true" & gt; & Lt; Column name = "NAME" jdbc-type = "varchar" /> & Lt; / Region & gt; & Lt; Field name = "status" persistent = "continuous" default-fetch-group = "true" & gt; & Lt; Column name = "POSITION_ID" jdbc-type = "integer" /> & Lt; / Region & gt; & Lt; / Square & gt; & Lt; / Package & gt; & Lt; / JDO & gt; @PressPricePackaging Public Class Employee Object (Private Integer ID; Private String Name; Private Status Status; Public Employee (Integer ID, String Name, Status Status) {this.id = id; This.name = name; This.position = Status;}} @breaking packaging public class status object {private integer id; private string title;}  

I have no such problem in my case. Object using pm.getObjectById (id).


Comments