Search code examples
jdohbasejdoql

Unable to fetch object by id in JDOQL


I am pretty naive to hbase and JDO. I was trying to use

Query q = pm.newQuery(MyClass.class, "id == " + taskId);
List<MyClass> taskList = (List<MyClass>)q.execute();

But to my disappointment the list I am receiving is blank. although the taskId in the argument is already present.

Any kind of help would highly appreciable.

Thanks in advance!!


Solution

  • If fetching an object by id then would make way more sense to call

    pm.getObjectById(...)
    

    and if using a query, it would be normal to look at the log