For fetching data from datastore via primary key using JDO, Is there
any performance difference between

PersistenceManager pm = PMF.get().getPersistenceManager();
Employee e = pm.getObjectById(Employee.class, user.getEmail());

and

PersistenceManager pm = PMF.get().getPersistenceManager();

String query = "select from " + Employee.class.getName() + " where ID
== '" + user.getEmail + "'";
List<Employee> eList = (List<Employee>) pm.newQuery(query).execute();
Employee e = eList.get(0);

ID is the primary key for entity class Employee.

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to