I am on an emergency upgrade mission. Our production odb file (version 1.0.4) currently corrupts when written to. Importing to 2.6.8. has seemed to fix the corruption problem. So....I am in the middle of testing a 2.6.8 upgrade from 104se_2522. It was plugged in to the existing legacy code (2005'ish). Trying to modify as little as possible. I am having trouble with the following:(names have been simplified)
public MyClass retrieveMyClass(String oid, boolean makeTransient, MyContext context) throws PersistenceLayerException { MyClass myclass = null; try{ Object objectid = pm.newObjectIdInstance(AFPhysicalPart.class, oid); physpart = (MyClass) pm.getObjectById(objectid, false); if(makeTransient) myclass= (MyClass) myclass.clone(); //if(makeTransient) pm.makeTransient(myclass); }catch (JDOException jdoe){ } return myclass; }
objectid is coming back as null. Does this problem seem obvious to you?
Thanks
Brian
(There is a complete re-write in the works but not ready for release)