tzaeschke / zoodb

ZooDB Object Database
Apache License 2.0
57 stars 9 forks source link

"Can not access field" error during query #53

Closed tzaeschke closed 9 years ago

tzaeschke commented 9 years ago

The problem is that the query evaluator simply loads ALL dirty objects from the cache into the query processor, without checking whether they have the correct class. When the objects are evaluated, the query processor crashes because it may encounter an incompatible class which cannot be accessed via reflection, hence the error.

This error occurs only if a dirty instance of an incompatible class is in the client cache and if the query involves an indexed attribute (the code branch for non-indexed attributes works fine). Also, obviously, the ignore-cache setting has to be false.

tzaeschke commented 9 years ago

See test Test_122_QueryBugs.testQueryFieldAccess_Issue_53().