[ http://opensource.atlassian.com/projects/hibernate/browse/HB-1559?page=all ]
Christian Bauer resolved HB-1559:
---------------------------------
Resolution: Rejected
Blah, the only required datatype for a relational database is boolean, a truth-valued type. Just because Oracle isn't a relational database doesn't mean we should break all queries for booleans...
> portability of boolean properties in HQL WHERE clause
> -----------------------------------------------------
>
> Key: HB-1559
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1559
> Project: Hibernate2
> Type: Improvement
> Versions: 2.1.8
> Environment: postgresql vs. Oracle
> Reporter: Bill Schneider
>
>
> "from Foo foo where foo.booleanProperty"
> works in PostgreSQL because it has a native boolean column type, but breaks in Oracle.
> The Hibernate docs say to use substitutions in Hibernate configuration, and "= true" literal:
> <property name="hibernate.query.substitutions">true 1, false 0</property>
> ...
> from eg.Cat cat where cat.alive = true
> Suggested improvement: the former "where foo.booleanProperty" should be considered invalid HQL and break during HQL parsing on *all* platforms, rather than literally translating to SQL and breaking selectively on DBs without native booleans.
> Always require explicit " = true".
> And incorporate literal substitution (true=1 false=0) into the Dialect.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|