users@glassfish.java.net

Re: subquery: select sum(x.fieldA + x.fieldB).... help!

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Thu, 5 Apr 2007 22:29:22 +0200

The problem is that it does not allow arithmetic within the WHERE
clause as well.
I cannot imagine how JPA spec. designers could ignore arithmetic
operations, they are so important that now I cannot imagine how to use
JPA for something bigger than just a tutorial :(

The only thing that saves me now is the fact, that Hibernate JPA
allows this (even if this is not legal in JPA 1.0) so I can try to
switch from TopLink Essentials into Hibernate now and wait for newer
versions of TopLink to implement this non-standard feature...

Before I started with ORM tools and JPA I was reading about this and
was thinking - WOW there is everything one can possibly need. But now
I can say there are lot of things that should be added immediately. I
can't wait for new JPA >1.0 or maybe 2.x.

Do you know anything about new JPA? Are there any works on that subject?

2007/4/5, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org>:
> The issue here is that the specification does not allow arithmatic within the select clause of the Query. I would recommend filing an enhancement request against TopLink Essentials and altering your application to use a Native Query.
> --Gordon
> [Message sent by forum member 'gyorke' (gyorke)]
>
> http://forums.java.net/jive/thread.jspa?messageID=211294
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>