Hi Daniels,

Actually, you can have & use indexes for single (1 to 1 relation) nested
objects. You can't have indexes for nested collections.

"Indexes for nested *collections* and in particular for *maps* are not 
supported.". 

I wonder why Examples does not have that. Please see how it could be used:

public class Model implements Serializable {
    @QuerySqlField
    private CustomObject obj;

    public Model(String sortField) {
        this.obj = new CustomObject(sortField);
    }
}

public class CustomObject {
    @QuerySqlField(index = true)
    private String objName;

    public CustomObject(String objName) {
        this.objName = objName;
    }
}

Sample queries:

        List res = cache.query(new SqlQuery<>(Model.class, "ORDER BY
objName")).getAll();
        res = cache.query(new SqlQuery<>(Model.class,
"objName=?").setArgs(1)).getAll();

Thank you,
Alexey




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to