We're updating the issue view to help you get more done. 

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

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")

Workaround

None

Acceptance Test

com/gigaspaces/test/database/sql/ContainsQueryTest.java

Status

Assignee

Meron Avigdor

Reporter

Dixson Huie

Labels

None

Priority

Medium

SalesForce Case ID

11829, 11953, 12012

Fix versions

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Open Source

Platform

All