persistence@glassfish.java.net

status for issue 136

From: jie leng <jie.leng_at_Sun.COM>
Date: Mon, 27 Mar 2006 12:03:46 -0800

Hi, Jerome,

Here is the status for Issue 136 - JPQL validation: Parser not catching
invalid type used with IN expression.
https://glassfish.dev.java.net/issues/show_bug.cgi?id=136

According to the EJB spec:
in_expression ::= state_field_path_expression [NOT] IN (in_item {,
in_item}* | subquery)
The state_field_path_expression must have a string, numeric or enum value.
The in_item and the result of subquery must be like the same abstract
schema type of the state_field_path_expression.

There are two parts of validation: first part validates the allowed data type, second
part checks for compatibility of IN expression data type. If the first part validation fix is checked in, one test in entity-persistence-tests using timestamp in IN expression will fail. Some database do support date type and other types in IN expression other than string, numeric and enum value. EJB Spec is more restrict on data type in IN expression.

So to allow user still use timestamp or other type that supported by databases, the
first part of validation will not be checked in until we fix issue 481 -
add query hint to disable jpql validation :
https://glassfish.dev.java.net/issues/show_bug.cgi?id=481

I already checked in the second part of the fix. I will downgrade the
issue to P4.

Thanks.

Jielin