Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Error while querying on nested collections

Hi All,

I have found very strange issue while querying data using web-ui (probably the same issue occurs while querying directly from code). Here are my "failing" queries:

select UID,* from Customer where rowNum<5000 and configuration.contacts[*](postcode.id = 5 OR postcode.id = 87)
select UID,* from Customer where rowNum<5000 and configuration.contacts[*](postcode.id IN (5,87))

The exception is:

2014-05-27 13:25:24,177  SEVERE [com.gigaspaces.webui.common] - com.j_spaces.jdbc.parser.grammar.ParseException: Encountered " "in" "IN "" at line 1, column 130.
Was expecting one of:
    "like" ...
    "not" ...
    "<" ...
    "<=" ...
    ">" ...
    ">=" ...
    "=" ...
    "!=" ...
    "<>" ...
    "(" ...
    "[*]" ...

This is weird as the following query works fine:

select UID,* from Customer where rowNum<5000 and configuration.contacts[*](postcode.id = 5 AND postcode.id = 87)

contacts is a set of objects (Contact class). configuration and postcode are objects as well. id is an integer;

Any idea why it works that way?

I would be very thankful for any help!

Thanks, Piotr

asked 2014-05-27 09:17:23 -0600

Piotr gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

Currently "in" is not supported for nested collection,and you should use the long format. however we plan adding this feature in next versions.

answered 2014-05-28 06:00:40 -0600

Ester gravatar image
edit flag offensive delete link more

Comments

Thanks for the answer. What about OR statement?

Thanks, Piotr

Piotr gravatar imagePiotr ( 2014-05-28 08:37:21 -0600 )edit
0

If I am not wrong you are using a nested property feature that has been introduced recently (9.6?) are you sure the gs-ui you are using has already this feature?

answered 2014-05-28 02:51:07 -0600

edmondo1984 gravatar image
edit flag offensive delete link more

Comments

I have the same problem in 9.7 version

Kamil K gravatar imageKamil K ( 2014-05-28 03:58:20 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-27 09:17:23 -0600

Seen: 118 times

Last updated: May 28 '14