pombreda / appengine-ndb-experiment

Automatically exported from code.google.com/p/appengine-ndb-experiment
Other
0 stars 0 forks source link

Queries on polymodel root class should not filter by class key #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems unnecessary to filter by the class key property when querying the root 
class in a polymodel hierarchy.

In practice this forces creation of a lot of composite indexes (even just 
ordering by an indexed property will require an extra index).

My most frequent use of the polymodel functionality is to perform polymorphic 
queries on the root class, so it could be a useful improvement.

Original issue reported on code.google.com by joachim@jkrebs.com on 4 Oct 2012 at 10:50

GoogleCodeExporter commented 9 years ago
Hm, I think you're right. If you have a minute to come up with a patch I'd be 
happy to take it from there.

Original comment by guido@google.com on 4 Oct 2012 at 11:12

GoogleCodeExporter commented 9 years ago
I've attached a simple patch with test case.

Original comment by joachim@jkrebs.com on 5 Oct 2012 at 11:25

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision a92aadf13e59.

Original comment by guido@google.com on 8 Oct 2012 at 11:29

GoogleCodeExporter commented 9 years ago
If you haven't done so yet, would you mind filing the contributor agreement per 
http://code.google.com/p/appengine-ndb-experiment/wiki/Contributing ?

Original comment by guido@google.com on 8 Oct 2012 at 11:30