kabustalek
unread,Apr 11, 2012, 6:46:31 AM4/11/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to orient-...@googlegroups.com
Hi,
i have a query like
List<ODocument> result = db.command(new OSQLSynchQuery<ODocument>("select from index:unprocessed where key = [false,false]", 1)).execute();
When i execute this, i get an ArrayList with size of 95 - but i thought the 1 should limit the result to 1 - i think this would increase performance.
The next question is, how can i transfer this ODocument to my POJO?
When i try it with
ORID identity = ((ODocument)db.getUserObjectByRecord(result.get(0), null)).getIdentity();
POJO pojo = (POJO) db.load(identity);
i get the exception:
java.lang.IllegalArgumentException: Cannot create the object: class name is empty
at com.orientechnologies.orient.core.entity.OEntityManager.createPojo(OEntityManager.java:59)
at com.orientechnologies.orient.core.db.object.ODatabaseObjectTx.newInstance(ODatabaseObjectTx.java:85)
at com.orientechnologies.orient.core.db.ODatabasePojoAbstract.getUserObjectByRecord(ODatabasePojoAbstract.java:361)
at com.orientechnologies.orient.core.db.ODatabasePojoAbstract.getUserObjectByRecord(ODatabasePojoAbstract.java:339)
Any ideas? Is there a better way to get my pojo?