Well, that was a bust. I guess you can't do a query on a reference "collection" using the key. I tried every variation I could think of, and while the DataStore didn't complain, it never returned any entities.
On Feb 27, 7:41 am, Devel63 <danstic...@gmail.com> wrote: > kind1 is really class Kind1(search.SearchableModel). The query > against Kind1 is really query.search("keyword_string"). I alluded to > this at the bottom of my first post, but was hoping I could get a > generalized solution. > > One approach may be to use username as the key for kind2, and thus my > query can be Kind1.all().search(keyword_string).filter > ('collection_name >', key_constructed from username).filter > ('collection_name <', key_constructed_from_usernameZ).fetch(). I'm > not sure it's going to work! If there's a cleaner, more generalized > approach, I'd love to hear it! > > On Feb 26, 9:58 pm, Tim Hoffman <zutes...@gmail.com> wrote: > > > So in your original posting you said > > > kind1 where prop1 = specific_value. > > > So what specific value would you be looking for the whole text or > > specific words or combinations of words (in a particular order ) > > > This is I think where you approach will be determined. > > > T > > > On Feb 27, 1:41 pm,Devel63<danstic...@gmail.com> wrote: > > > > It's a good idea, and it's what I've used elsewhere, but in this case > > > kind1_prop is really text (I'm using the searchable data model). > > > These are not tiny, and contain data from multiple fields. It would > > > be expensive to duplicate all this in a third class, and multiply the > > > data storage by a factor of 1 million. So ... is there another way? > > > > On Feb 26, 7:20 pm, Tim Hoffman <zutes...@gmail.com> wrote: > > > > > I think you should create a new entity > > > > which has > > > > kind1_key > > > > kind1_prop > > > > kind2_key > > > > kind1_ref > > > > kind2_ref > > > > > Filter on kind2 key, kind 1 key , kind1 prop > > > > The use the refs to get the real objects when you need to. > > > > > Or something like that > > > > > T > > > > > On Feb 27, 4:09 am,Devel63<danstic...@gmail.com> wrote: > > > > > > Until now, the lack of a SQL-like join capability has not been an > > > > > issue. But... > > > > > > I have 2 entity kinds: > > > > > - kind1: prop1 > > > > > - kind2: username, reference_to_kind1 > > > > > > I want to find all kind2's where user=me and reference_to_kind1 is a > > > > > kind1 where prop1 = specific_value. > > > > > > I can't figure out a way to do this except to start with either class, > > > > > do a fetch, then iterate over all references. This is potentially A > > > > > LOT of individual queries. The intersection/join is small, but each > > > > > kind can have large numbers of entities. > > > > > > How is this done? > > > > > > P.S. Please don't suggest denormalization, because the above is a > > > > > simplified example. I am really doing this with text fields in kind1, > > > > > and keyword searchables. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---