问题
How can I tell JPA (EclipseLink 2.4) to check a boolean IN parameter whether it is true or false?
SELECT e FROM MyEntity e WHERE :inParam = TRUE AND e.x = 'bla'
or
SELECT e FROM MyEntity e WHERE :inParam = true AND e.x = 'bla'
Doing it as above results in an exception that TRUE wouldn't be a valid value for inParam.
来源:https://stackoverflow.com/questions/29033065/how-can-i-test-a-boolean-parameter-in-a-namedquery-with-jpa