Hi,
I have a database view from which I can obtain primary-key integer values.
I want to retrieve the actual Java class instances that correspond to those
primary-key values.
After a bit of trial and error I have figured out that the following should
work, but still gives me a message saying the object in question doesn't
exist.
PersistenceManager manager = isisJdoSupport.getJdoPersistenceManager();
Participant = (Participant)
manager.getObjectById("4711[OID]au.com.scds.chats.dom.participant.Participant");
I see the following:
javax.jdo.JDOObjectNotFoundException: No such object
FailedObject:4711[OID]au.com.scds.chats.dom.participant.Participant
at
org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:564)
at
org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)
at
org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1698)
at
au.com.scds.chats.dom.report.dex.DEXBulkUploadReport.getClients(DEXBulkUploadReport.java:188)
...
I know that the relevant record is in the database, is DN just telling me
that its just not in the cache?
I wonder if anyone else has some experience with this aspect? I've tried
the examples in the DN documentation without success, seems I am missing
something.
Thanks