[ 
https://issues.apache.org/jira/browse/DERBY-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789310#action_12789310
 ] 

Rick Hillegas commented on DERBY-651:
-------------------------------------

Thanks for continuing to experiment with UDTs, Knut. I have logged two issues 
to track the behaviors you have discovered.

DERBY-4469: I agree that the spec is too harsh and we should allow certain 
casts to UDTs, including casts from ?, NULL, and subtypes

DERBY-4470: The ordering behavior you see is wrong and should be corrected. I 
think it results from the fact that java.lang.String gets special handling. I 
do get an error if I try to sort on the Price type. E.g.:

ij> connect 'jdbc:derby:memory:dummy;create=true';
ij> create type Price external name 
'org.apache.derbyTesting.functionTests.tests.lang.Price' language java;
0 rows inserted/updated/deleted
ij> create table t( a price );
0 rows inserted/updated/deleted
ij> select * from t order by a;
ERROR X0X67: Columns of type '"APP"."PRICE"' may not be used in CREATE INDEX, 
ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because 
comparisons are not supported for that type.

Thanks!

> Re-enable the storing of java objects in the database
> -----------------------------------------------------
>
>                 Key: DERBY-651
>                 URL: https://issues.apache.org/jira/browse/DERBY-651
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-651-01-aa-basicCreateDropType.diff, 
> derby-651-02-af-udtColumnsRetvalsParams.diff, 
> derby-651-03-aa-udttestInstability.diff, derby-651-04-aa-javadoc.diff, 
> derby-651-05-ac-dependencyTable.diff, UserDefinedTypes.html, 
> UserDefinedTypes.html, UserDefinedTypes.html, UserDefinedTypes.html
>
>
> Islay Symonette, in an email thread called "Storing Java Objects in a table" 
> on October 26, 2005 requests the ability to store java objects in the 
> database.
> Old releases of Cloudscape allow users to declare a column's type to be a 
> Serializable class. This feature was removed from Derby because the syntax 
> was non-standard. However, most of the machinery to support objects 
> serialized to columns is still in Derby and is even used in system tables. We 
> need to agree on some standard syntax here and re-expose this useful feature. 
> Some subset of the ANSI adt syntax, cumbersome as it is, would do.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to