Status/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Joel Watson / Joel Watson (existdissolve)
Created: 05/02/2012
Components: ORM Support
Versions: 9.0.1
Failure Type:
Found In Build/Fixed In Build: 9.0.1 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Windows 7
Vote Count: 2
Problem Description: When using EntityToQuery(), bit columns are converted to an "UNKNOWN" data type. When trying to use the named column in a Query of Queries (e.g., select mybitcolumn from thequery), the following error occurs: "Query Of Queries runtime error. Unsupported SQL type java.sql.Types.UNKNOWN."
Steps to Reproduce:
1.) Create an ORM entity:
component persistent="true" entityname="Test" table="Test" {
property name="TestID" column="TestID" fieldtype="id" generator="guid";
property name="ActionDate" column="ActionDate" type="timestamp";
property name="BitFlag" column="BitFlag";
}
2.) Load the entity, and convert to query with EntityToQuery()
3.) View metadata of query: writedump( getmetadata( entitytoquery(myentity ) ) ) ... notice that the bit field has a TypeName of "UNKNOWN"
4.) Try to perform a Query of Queries on the result of EntityToQuery, and explicitly include the name of the Bit column in the select list (problem doesn't occur when "*" is used)
Actual Result: "Query Of Queries runtime error. Unsupported SQL type java.sql.Types.UNKNOWN."
Expected Result: Result of EntityToQuery should properly identify the data type of the Bit column, after which the Query of Query mentioned above will work as expected.
Any Workarounds: The only workaround would seem to be to manually build the query result, not using the EntityToQuery() method whatsoever.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3180344
External Customer Info:
External Company:
External Customer Name: existdissolve
External Customer Email:
External Test Config: Windows 7, SQL Server 2008
Attachments:
Comments: