I have a class College declared with location and fName String fields.
I am trying to retrieve values from that table using the following
query. On execution it says that SQL construct is not supported by the
JDO in googe app engine.


Query query = pm.newQuery("javax.jdo.query.SQL", "select * from
College where location like '"+xxxx+"' or fName like '"+yyyy+"'");
 query.setClass(College.class);
 College results = (College)query.execute();

How can i solve this problem? If i try to use


Query query = pm.newQuery("select from
com.strutsgoogle.CollegeApp.College where location == '"+ location+"'
&& fName=='amaan'");
  List <College>entries = (List<College>) query.execute();

This result set would only return me results based on the condition if
both the criterias location and fName are true. how can i get somethg
in which i may not pass any value for the fName parameter and still
get results for all the locations. || operator can be applied to the
same field from the table and not multiple fields.

SQL query: select * from college where location like 'xxxx.' or fName
like 'yyyy'
Can somebody help me in getting the JDOQuery supported by google app
engine for the above mentioned SQL query construct??



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en.

Reply via email to