Hi Hemambara,
Could you bring a little bit more details about your problem?
I would like to see you java classes and QueryEntity configuration.
Ideally it would be to have a runnable reproducer (junit test or class
with main method).
Also I would like to realize how soon are you expecting a fix in Ignite release?
As far as I know next Ignite release is planned in the beginning of next year.
I tried following and it worked for me:
class User {
String userName;
Address address;
public User(String userName, Address address) {
this.userName = userName;
this.address = address;
}
}
class Address {
String streetName;
String zipcode;
public Address(String streetName, String zipcode) {
this.streetName = streetName;
this.zipcode = zipcode;
}
}
@Test
public void testSqlPojoWithoutAnnotations() throws Exception {
IgniteEx grid = startGrid(0);
LinkedHashMap<String, String> fields = new LinkedHashMap<>();
fields.put("userName", "String");
fields.put("address.zipcode", "String");
IgniteCache<Object, Object> cache = grid.createCache(new
CacheConfiguration<>(DEFAULT_CACHE_NAME)
.setQueryEntities(Collections.singleton(new
QueryEntity(Integer.class, User.class)
.setFields(fields))));
cache.put(1, new User("ivan", new Address("a", "123")));
System.err.println(cache.query(new SqlFieldsQuery("select * from
User")).getAll());
System.err.println(cache.query(new SqlFieldsQuery("select zipcode
from User")).getAll());
cache.query(new SqlFieldsQuery("create index on User(zipcode)"));
System.err.println(cache.query(new SqlFieldsQuery("select zipcode
from User")).getAll());
}
ср, 16 окт. 2019 г. в 10:59, Hemambara <[email protected]>:
>
> Hello Ivan, can you please check and provide updates on this
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
--
Best regards,
Ivan Pavlukhin