Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-136
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-136
Summary: Provide a way to map Boolean type to Oracle Integer
Type: Improvement
Status: Assigned
Priority: Minor
Project: Cayenne
Components:
Cayenne Core Library
Versions:
1.1 [DEV]
Assignee: Andrus Adamchik
Reporter: Bryan Lewis
Created: Mon, 7 Jun 2004 9:54 AM
Updated: Mon, 7 Jun 2004 9:54 AM
Environment: Oracle 8.1.6. Reproduced on JDK 1.4.2_04 on Win2K and Solaris 8 but they probably doesn't matter; appears to be an Oracle thing. Don't know whether it will happen on Oracle 9i but I suspect so.
Description:
See mailing list postings "can't use Boolean in query?" on May 30 and Jun 1. It's possible to model an INTEGER column as a Boolean in the modeler and it works fine in the getter method, e.g.,
Boolean isManager = employee.getIsManager();
but it doesn't work in queries.
Expression qual = ExpressionFactory.matchExp("isManager",
new Boolean(true));
causes this exception:
SELECT t0.EmployeeCode, t0.IsManager, ... FROM EMPLOYEE t0
WHERE t0.IsManager = ? [bind: 'true']
[QueryLogger] *** error.
java.lang.ClassCastException
at oracle.jdbc.driver.OraclePreparedStatement.setObject
(OraclePreparedStatement.java:2018)
Andrus thought he might add an ExtendedType subclass for boolean values until a more generic solution could be implemented.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Mon Jun 07 2004 - 09:55:53 EDT