Uploaded image for project: 'InsightEdge Platform'
  1. GS-13535

Null comparison does not work in SQL query when using a nested collection of objects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 14.0, 12.3.1-patch1
    • Labels:
      None
    • Platform:
      All
    • SalesForce Case ID:
      11829, 11953, 12012
    • Acceptance Test:
      com/gigaspaces/test/database/sql/ContainsQueryTest.java
    • Sprint:
    • Product:
      XAP
    • Edition:
      Open Source

      Description

      ParentPojo defines a List:
        List<MyPojo> items;

      And child pojo defines a message field:
        String message;

      When attempting to run sql to compare one of the fields of the child object, for example:

      new SQLQuery(ParentPojo.class, "items[*].message is null");

      Generates exception:
      StackTrace: com.j_spaces.core.client.sql.SQLQueryException: Failed to execute SQLQuery : [item[*].message is not null] cause: java.sql.SQLException: Error in statement [item[*].message is not null]; Cause: com.j_spaces.jdbc.parser.grammar.ParseException: Encountered " "is" "is "" at line 1, column 17.


      If field in parent is not collection but a single object, it works. For example:
      SQLQuery(ParentPojo.class, "datePojo.message is null")

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: