Open GoogleCodeExporter opened 9 years ago
Validate the filter criteria in queries. If the property is not valid (bad name
not
matching fields of the kindClass, or doesn't match synthetic property names),
or if
the value is of the wrong type then throw an exception. The exception will be
Key
since you can't check for parents and the actual data. There may be more
exceptions
like that.
This will keep people from making typos and using the wrong type for filters.
This must be optional since people can add properties to the entity outside of
Objectify's normal persistence mechanism.
I'd suggest a (Query) doNotValidate() method be added to override this default
behaviour.
The checks must be run (right) before the query is executed so that all errors
can be
reported, after the query is constructed.
Original comment by scotthernandez
on 19 Feb 2010 at 4:12
Some of this can be done at compile time using the JSR 269 annotation processor
that I wrote called objectify-query
(http://code.google.com/p/objectify-query/).
Perhaps we should add more features for more enforcements to objectify-query,
rather than making runtime more complicated.
Original comment by bren...@doherty.net.nz
on 12 Apr 2011 at 12:32
I'm certainly +1 for that :-)
Original comment by lhori...@gmail.com
on 12 Apr 2011 at 5:43
Issue 54 has been merged into this issue.
Original comment by lhori...@gmail.com
on 14 Apr 2014 at 12:02
Original comment by lhori...@gmail.com
on 14 Apr 2014 at 12:38
Issue 152 has been merged into this issue.
Original comment by lhori...@gmail.com
on 14 Apr 2014 at 12:51
Another validation that should probably log a warning: querying on a property
that is not indexed.
Original comment by lhori...@gmail.com
on 14 Apr 2014 at 12:51
Original issue reported on code.google.com by
scotthernandez
on 19 Feb 2010 at 4:05