You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by mmjose26 <mm...@yahoo.com.mx> on 2011/04/14 21:49:05 UTC
comparing long values with JCR-JQOM fails.
when I compare long type values with JCR-JQOM the query SQL2 generated doesnt
take care of long type.
it would be due to org.apache.jackrabbit.commons.query.sql2.QOMFormatter
method private void append(Literal value)
....
...
case PropertyType.LONG:
append(v.getString());
maybe would be
case PropertyType.LONG:
appendCastLiteral(v.getString(),"LONG");
it makes sense?
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/comparing-long-values-with-JCR-JQOM-fails-tp3450547p3450547.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: comparing long values with JCR-JQOM fails.
Posted by mmjose26 <mm...@yahoo.com.mx>.
Shure!
I test with values greather than 1,000,000,000,000 and it fails, due that
primitive int bit Width (Range values).
in general,
test with any long greather than 32-bit signed two's complement integer
(greather than 2,147,483,647)
Jose.
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/comparing-long-values-with-JCR-JQOM-fails-tp3450547p3452355.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: comparing long values with JCR-JQOM fails.
Posted by Alex Parvulescu <al...@gmail.com>.
Hi,
I don't think you would need to cast explicitly.
do you have an example where this breaks? a unit test maybe ;)
alex
On Thu, Apr 14, 2011 at 9:49 PM, mmjose26 <mm...@yahoo.com.mx> wrote:
> when I compare long type values with JCR-JQOM the query SQL2 generated
> doesnt
> take care of long type.
>
>
> it would be due to org.apache.jackrabbit.commons.query.sql2.QOMFormatter
> method private void append(Literal value)
> ....
> ...
> case PropertyType.LONG:
> append(v.getString());
>
> maybe would be
>
> case PropertyType.LONG:
> appendCastLiteral(v.getString(),"LONG");
>
> it makes sense?
>
> --
> View this message in context:
> http://jackrabbit.510166.n4.nabble.com/comparing-long-values-with-JCR-JQOM-fails-tp3450547p3450547.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>