You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Dave Merrin <dm...@ipasystems.co.uk> on 2009/01/08 17:19:52 UTC

ExpressionFactory Usage?

Hi,

I'm trying to create an expression that compares to fields in a single 
table i.e. number1<=number2. I'm using the ExpressionFactory to create 
all my expressions. Can I still use it to do create this expression?

Cheers,

Dave

Re: ExpressionFactory Usage?

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Jan 8, 2009, at 6:50 PM, Dave Merrin wrote:

> I did as you suggested and gave the Expression.fromString() a try  
> and this worked.

Great! My memory was a bit rusty on this one.

Andrus


Re: ExpressionFactory Usage?

Posted by Dave Merrin <dm...@ipasystems.co.uk>.
Cheer Andrus,

I did as you suggested and gave the Expression.fromString() a try and 
this worked.

I'm not onto v3 yet so I can't use EJBQLQuery.

Dave

Andrus Adamchik wrote:
> "number1<=number2" means comparing two columns? ExpressionFactory 
> won't support it... IIRC even Expression.fromString() will not support 
> comparing two columns, instead expecting path vs value comparison 
> (worth a try though).
>
> EJBQLQuery on the other hand will support such comparison.
>
> Andrus
>
> On Jan 8, 2009, at 6:19 PM, Dave Merrin wrote:
>
>> Hi,
>>
>> I'm trying to create an expression that compares to fields in a 
>> single table i.e. number1<=number2. I'm using the ExpressionFactory 
>> to create all my expressions. Can I still use it to do create this 
>> expression?
>>
>> Cheers,
>>
>> Dave
>>
>
>


Re: ExpressionFactory Usage?

Posted by Andrus Adamchik <an...@objectstyle.org>.
"number1<=number2" means comparing two columns? ExpressionFactory  
won't support it... IIRC even Expression.fromString() will not support  
comparing two columns, instead expecting path vs value comparison  
(worth a try though).

EJBQLQuery on the other hand will support such comparison.

Andrus

On Jan 8, 2009, at 6:19 PM, Dave Merrin wrote:

> Hi,
>
> I'm trying to create an expression that compares to fields in a  
> single table i.e. number1<=number2. I'm using the ExpressionFactory  
> to create all my expressions. Can I still use it to do create this  
> expression?
>
> Cheers,
>
> Dave
>