db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bouschen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-633) List.get(int) support in JDOQL is missing
Date Thu, 30 Sep 2010 20:56:33 GMT

    [ https://issues.apache.org/jira/browse/JDO-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916654#action_12916654

Michael Bouschen commented on JDO-633:

Good job Andy!

I figured out there is a relationship field of type List in package org.apache.jdo.tck.pc.companyListWithoutJoin:
the employees field of class Department.
However, I like your solution better adding a new class MeetingRoom and a list relationship
to class Department.

A few comments:

- I tested your patch with dataNuclues 2.2.0-m1 and the result test runs into a NPE. Is this
the failure you mentioned?
    [java] 1) testGetInResult(org.apache.jdo.tck.query.jdoql.methods.SupportedListMethods)java.lang.NullPointerException
    [java] at org.datanucleus.store.rdbms.query.JDOQLQuery.compileInternal(JDOQLQuery.java:306)
    [java] at org.datanucleus.store.query.Query.executeQuery(Query.java:1642)

- In the new test class SupportedListMethods you could make use of method getPersistentCompanyModelInstance
to calculate the parameter value.
  So the statement
        Object[] parameters = new Object[]{1,
                getParameter(MeetingRoom.class, "roomid == 2", true)};
  can be replaced by
        Object[] parameters = new Object[]{1, getPersistentCompanyModelInstance("room2")};
  Then you do not need the local method getParameter anymore.

- There are some ToDos in the code. Do they need o be resolved before this can be checked

Regards Michael

> List.get(int) support in JDOQL is missing
> -----------------------------------------
>                 Key: JDO-633
>                 URL: https://issues.apache.org/jira/browse/JDO-633
>             Project: JDO
>          Issue Type: New Feature
>          Components: specification, tck
>    Affects Versions: JDO 2 maintenance release 2
>            Reporter: Timo Westkämper
>             Fix For: JDO 3 maintenance release 1
>         Attachments: list_get_method.patch
> It would be nice to get List.get(int) into JDOQL, in other words access of indexed list
> Querydsl has support for that and for consistency it would be nice if JDOQL supported
it as well.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message