Using Java and JDO. The package path is needed... fails without that. As I said earlier, it will work if I remove the where clause (or use a different property) so I am able to connect to the datastore and pull data. I can even look at the data from the Admin console so it is there and accessible. I just can't seem to get some query related indexes to work.
I've been all OVER the Google docs researching this... it's a bit convoluted and you have to piece information together from several places. I originally didn't want to use either JDO or JPA, but am using the open source geomodel software to do a proximity search on geo- coordinates in the data and that code requires JDO. Frustrating that something so simple can be so difficult. Thanks for your ideas. On Nov 9, 1:59 pm, Jeff Schwartz <[email protected]> wrote: > Should have asked what language you are using (Java or Python) as well as > if you are using jdo/jpa etc. > > The entity type you are querying - myPackage.HospitalData - is the > 'myPackage' part a package name? If so, why? The datastore doesn't know > about packages, it only knows about Entity types which are named. > > When you go into either production or dev console can you see the entities > you are querying for? The name they are listed under is their entity type > and that is the name you should use in your queries. > > Google's datastore docs are very good & provide a lot of information about > querying & indexes. > > If you are using JPA/JDO (that's assuming you are using Java) along with > datanucleus may I suggest you don't because the datastore is not SQL which > these 2 technologies are really geared towards and only serve IMO at least > to confuse the issue. Look into replacing it with a datastore centric ORM. I > personally use Objectify & I swear by it. > > Jeff > > > > On Tue, Nov 9, 2010 at 2:30 PM, Rmac <[email protected]> wrote: > > Nope, that throws a different error: Identifier expected at character > > 1 in "*" > > > On Nov 9, 10:43 am, Jeff Schwartz <[email protected]> wrote: > > > Try: > > > > select * from HospitalData where Version = '1' order by Hospital_Name asc > > > > Jeff > > > > On Tue, Nov 9, 2010 at 11:16 AM, Rmac <[email protected]> wrote: > > > > Thanks Jeff... here you go... > > > > > *The string query supplied to the Query: * > > > > > select from myPackage.HospitalData where Version == '1' order by > > Hospital_Name asc > > > > > *The GAE response:* > > > > no matching index found.. <datastore-index kind="HospitalData" > > ancestor="false" source="manual"> > > > > <property name="Version" direction="asc"/> > > > > <property name="Hospital_Name" direction="asc"/> > > > > </datastore-index> > > > > > *Those entries are in the datastore-indexes.xml file and show up on the > > admin console as below:* > > > > HospitalData > > > > Version ▲,Hospital_Name▲,City▲,State▲,ZIP_Code▲,Hospital_Type▲ > > > > > If I leave off the "where Version == '1'" the query works (or if I use > > Hospital_Name in the where instead). Currently, all entities have a > > property value of 1 for Version. This shouldn't be so difficult to figure > > out for a simple example like this! > > > > > Thanks for any feedback. > > > > > -- > > > > 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]<google-appengine%[email protected]> > > <google-appengine%[email protected]<google-appengine%[email protected]> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > > Jeff > > > -- > > 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]<google-appengine%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine?hl=en. > > -- > Jeff -- 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.
