jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: query improvements: downcasting

From: Emmanuel Bernard <emmanuel.bernard_at_jboss.com>
Date: Tue, 8 Mar 2011 20:34:47 +0100

On 8 mars 2011, at 16:19, Gordon Yorke wrote:

> Hello All,
>> Databases seem to differ as to whether the result should be null or
>> whether an error is raised. We need to decide this as well.
> An error is the better approach. Debugging null would be a challenge.
> --Gordon

I agree,
I like Adam's proposal to raise a ClassCastException except that we would lose all the query context (ie which column / row the exception occurs).