Hi
PersistenceManager pm = PMF.get().
getPersistenceManager();
Query query = pm.newQuery(Student.class);
query.setOrdering("school asc");
List<Student> s= (List<Student>)
(pm.newQuery(query).execute());
On Sat, May 28, 2011 at 11:45 PM, Shoubhik <[email protected]> wrote:
> I need to write the corresponding query for
>
> SELECT * FROM Student ORDER BY school ASC
>
> How should I write that for a datastore query?
>
>
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
>
> String query = "select from " + Student.class.getName() + "
> ORDER by school asc where center == '"+center+"'";
>
> List<Student> s= (List<Student>)
> (pm.newQuery(query).execute());
>
>
>
> The above code isn't working after adding the ** ORDER by school
> asc ** part !
> What should I do ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
--
*Best regards,*
*-------------------------------------------------------------------
*
*Hồ Công Danh*
Developer
[M] : 094 7579 583
[E] : [email protected] <[email protected]>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.