Probably a bug. I though that worked though.
On Nov 10, 2009, at 1:50 PM, Andrey Razumovsky wrote:
> Hi,
>
> Currently EJBQL parameter cannot be set as null. Test is simple as
> follows:
>
> EJBQLQuery query = new EJBQLQuery("select p from Painting p WHERE
> p.toArtist=:x");
> query.setParameter("x", null);
> createDataContext().performQuery(query);
>
> Caused by: java.lang.ClassCastException:
> org.apache.cayenne.reflect.generic.DataObjectToOneProperty cannot be
> cast to
> org.apache.cayenne.reflect.AttributeProperty
> at
> org
> .apache
> .cayenne
> .access
> .jdbc
> .EJBQLConditionTranslator
> .processParameter(EJBQLConditionTranslator.java:708)
> at
> org
> .apache
> .cayenne
> .access
> .jdbc
> .EJBQLConditionTranslator
> .visitNamedInputParameter(EJBQLConditionTranslator.java:345)
>
> Is it OK or this is a bug? I mean, is this case covered by JPA spec,
> since
> it i think we still should keep it where possible
This archive was generated by hypermail 2.0.0 : Tue Nov 10 2009 - 07:13:52 EST