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

Ask Your Question
0

Dynamic Properties with special characters

Hi,

I have created a dynamic property in my space class:

@SpaceClass
public class MyClass {
  DocumentProperties samples = new DocumentProperties();
}

Along with other properties I set those as, for example

samples.setProperty("13:11:32", 30);

Then, 13:11:32 is my property name and 30 my property value. If I try to fetch/save the object everything goes well. However when I try a query like this:

String queryString = "id = 5 AND 13:11:32 = 30";
new SQLQuery<>(MyClass.class, queryString); //Will execute this query

I get the following exception:

org.openspaces.core.BadSqlQueryException: Failed to create template from SQLQuery : [id = 5 AND 13:11:32 = 30]; 
Caused by: com.j_spaces.core.client.sql.SQLQueryException: Failed to create template from SQLQuery : [id = 5 AND 13:11:32 = 30]
Caused by: com.j_spaces.jdbc.parser.grammar.ParseException: Encountered " <INTEGER_LITERAL> "13 "" at line 1,    column 12.
Was expecting one of:
"rownum" ...
<IDENTIFIER> ...
<ESC_IDENTIFIER> ...
"(" ...

Could you give me directions on that?

asked 2014-05-15 10:14:42 -0500

Christian gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

I don't believe such property name is supported.Try 13_11_32 instead.-------- Original message --------From: forum@ask.gigaspaces.org

answered 2014-05-15 16:55:20 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Yes, I had to add a non-integer before the name as well, like this t13_11_32. I got confused just because saving/fetching DynamicProperties had no such restrictions, now it's working. Thanks for answering right away.

Christian gravatar imageChristian ( 2014-05-19 16:09:04 -0500 )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

Stats

Asked: 2014-05-15 10:14:42 -0500

Seen: 269 times

Last updated: May 15 '14