[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3551) Boolean substitution in informix
Hardy Ferentschik (JIRA)
noreply at atlassian.com
Mon Jan 10 08:59:05 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39522#action_39522 ]
Hardy Ferentschik commented on HHH-3551:
----------------------------------------
@Rouvignac in your custom dialect you still override _toBooleanValueString_ which would indicate that it is in fact needed in _InformixDialect_.
> Boolean substitution in informix
> --------------------------------
>
> Key: HHH-3551
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3551
> Project: Hibernate Core
> Issue Type: Bug
> Components: query-sql
> Affects Versions: 3.3.1
> Environment: Hibernate 3.2
> Informix 9.40
> Reporter: Rouvignac
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> HQL Query :
> select order from Order order where order.printed = ?
> Parameter :
> true, false, Boolean.TRUE or Boolean.FALSE
> When the request is executed we get the following error :
> SQLSTATE: IX000
> SQL CODE: -674
> 674: Routine (equal) can not be resolved.
> If as parameter we use "t" ot "f" everything works fine but it will not work with other DB.
> As a workaround we can use :
> property name="hibernate.query.substitutions">true t, false f</property>
> I investigated in Dialects :
> Dialect.java
> public String toBooleanValueString(boolean bool) {
> return bool ? "1" : "0";
> }
> PostgreSQLDialect.java
> public String toBooleanValueString(boolean bool) {
> return bool ? "true" : "false";
> }
> InformixDialect.java uses Dialect.java toBooleanValueString method.
> In my mind toBooleanValueString should be added to InformixDialect.java as follow :
> public String toBooleanValueString(boolean bool) {
> return bool ? "t" : "f";
> }
--
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
More information about the hibernate-issues
mailing list