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

Ask Your Question
0

read and change behave differently with the same SQLQuery

Hi,

I'm using Gigaspaces 12.2.1.

I am storing space document made up of a property called id that is set as the spaceId (autogenerated == true) and various other properties that are of type String. Some indexed and some not.

The problem I am encountering is that if I create the following SQLQuery:

SQLQuery<MyDocument> sq = new SQLQuery<>("MyDocument","`id` IN (?) AND `prop1` IN (?) AND `prop2` IN (?)");
sq.setParameter(1, Lists.newArrayList("myId"));
sq.setParameter(2, Lists.newArrayList("value1"));
sq.setParameter(3, Lists.newArrayList("value6", "value7"));

and then populate the space with a MyDocument object which only matches id but not the other two properties, the read and change behavior are different.

I get zero entries when issuing a read call with the above SQLQuery object which is expected. But if I issue a change call with the same SQLQuery object the result is one changed entry which is not expected.

If I remove the id IN (?) from the query, change and read work as expected.

It seems like including the id property in the query causes other the properties to be ignored. I have also tried using id = ? with the appropriate setParameter and the other two IN clauses but the behavior does not change.

Am I missing something here? Is the query I'm trying to write valid? Any thoughts?

Thanks!

Hanns

asked 2018-07-27 16:13:04 -0500

rowinggoon gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

This appears to be a bug. I have logged a ticket for this. If you would like to be notified on updates to this issue, please open a support case.

answered 2018-07-31 11:36:04 -0500

Dixson Huie gravatar image
edit flag offensive delete link more

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: 2018-07-27 16:13:04 -0500

Seen: 89 times

Last updated: Jul 31