[jira] Commented: (JDO-267) Query with alias result generates incorrect SQL
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > [jira] Commented: (JDO-267) Query with alias result generates incorrect SQL




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Commented: (JDO-267) Query with alias result generates incorrect SQL  
Craig Russell (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-28-05 10:46 PM

[ 
> Query with alias result generates incorrect SQL
> -----------------------------------------------
>
>          Key: JDO-267
>          URL: [url]http://issues.apache.org/jira/browse/JDO-267" target="_blank">http://issues.apache.org/jira/brows.../browse/JDO-267
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Craig Russell
>     Assignee: Andy Jefferson

>
> This JDOQL query results in the wrong SQL:
>         /*UNIQUE*/      Boolean.FALSE,
>         /*RESULT*/      "firstname AS firstName, lastname AS lastName",
>         /*INTO*/        FullName.class,
>         /*FROM*/        FullTimeEmployee.class,
>         /*EXCLUDE*/     Boolean.TRUE,
>         /*WHERE*/       "salary > 1000 & projects.contains(p) & " +
>                         "p.budget > limit",
>         /*VARIABLES*/   "Project p",
>         /*PARAMETERS*/  "BigDecimal limit",
>         /*IMPORTS*/     "import org.apache.jdo.tck.pc.company.Project; " +
>                         "import java.math.BigDecimal",
>         /*GROUP BY*/    "firstname, lastname HAVING lastname.startsWith('e
mp')",
>         /*ORDER BY*/    "lastname ASCENDING",
>         /*FROM*/        0,
>         /*TO*/          3)
> 001 error:  javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT D
ISTINCT THIS.FIRSTNAME AS firstName,THIS.LASTNAME AS lastName,THIS.LASTNAME FROM dat
astoreidentity0.PERSONS THIS INNER JOIN datastoreidentity0.PROJECT_MEMBER THIS_PROJE
CTS
ON THIS_PROJECTS."MEMBER" = THIS.DATASTORE_IDENTITY INNER JOIN datastoreiden
tity0.PROJECTS UNBOUND_P ON UNBOUND_P.DATASTORE_IDENTITY = THIS_PROJECTS.PRO
JID LEFT OUTER JOIN datastoreidentity0.PROJECTS UNBOUND_P_BUDGET ON UNBOUND_
P.DATASTORE_IDENTITY = UNB
OUND_P_BUDGET.DATASTORE_IDENTITY WHERE THIS.DISCRIMINATOR = ? AND THIS.SALAR
Y > 1000 AND UNBOUND_P_BUDGET.BUDGET > .2E4 GROUP BY THIS.FIRSTNAME,THIS.LAS
TNAME HAVING LOCATE(?,THIS.LASTNAME) = 1 ORDER BY THIS.LASTNAME" : Column na
me 'LASTNAME' appears more
than once in the result of the query expression.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:09 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register