Open cmoscardi opened 8 years ago
I took a look through the code. The main issue is that:
model._query
passes in the result of _get_kind()
to query, query then uses that to lookup the Model during projection/group_by property validation. In the case of polymodel
, _get_kind()
returns the base class name. Then when validation happens this will fail.
This looks like a broken separation of concerns. The model's _query()
method should validate that the properties are a part of the query, not the query itself. However, this isn't quite right because of gql queries where the Kind is specified in the query and then constructed without calling model.query()
.
I am also stuck on this issue. It has been quite some time since the last comment but I am still wondering if anyone could help me. Thank you!
Hi, the issue can be seen here on SO: http://stackoverflow.com/questions/28250761/appengine-datastore-polymodel-and-projection
I've copied the relevant bit here for convenience...
Below I present a simpler model (removed StructuredProperty) which gives the same issue:
This works:
This does not work:
In particular, the raised error is :