[ 
https://issues.apache.org/jira/browse/IGNITE-10635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrey updated IGNITE-10635:
----------------------------
    Description: 
Can't select row with uuid predicate:

SELECT PARENTID FROM "HumanName".HUMANNAMEMODEL WHERE PARENTID = 
'e3f070fa78884fbbbaaca02d5338e217';

 

"class org.apache.ignite.IgniteCheckedException: Invalid flag value: -29"
{code:java}
public abstract class GenericChildModel<T extends Serializable, P extends 
Serializable> implements Serializable {

    transient protected T id;
    protected transient AffinityKey<T> key;

    @QuerySqlField(notNull = true, orderedGroups = {@QuerySqlField.Group(name = 
"parent_version_idx", order = 0)})
    protected P parentId;

    @QuerySqlField(notNull = true, orderedGroups = {@QuerySqlField.Group(name = 
"parent_version_idx", order = 1, descending = true)})
    protected Long version;

    transient protected P colocationId;


    public T getId() {
        return id;
    }

    public void setId(T id) {
        this.id = id;
    }

    public P getParentId() {
        return parentId;
    }

    public void setParentId(P parentId) {
        this.parentId = parentId;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    public P getColocationId() {
        return colocationId;
    }

    public void setColocationId(P colocationId) {
        this.colocationId = colocationId;
    }

    public AffinityKey<T> key() {
        if (key == null)
            key = new AffinityKey<>(id, colocationId);
        return key;
    }

.... 

public class HumanNameModel extends GenericChildModel<UUID, UUID> {
    public static final String[] HUMAN_NAME_USE = {"usual", "official", "temp", 
"nickname", "anonymous", "old", "maiden"};

    @QuerySqlField
    private Byte use;
    @QuerySqlField(notNull = true, orderedGroups = {@QuerySqlField.Group(name = 
"fullname_idx", order = 0)})
    @NotNull
    @Name
    private String family;
    @QuerySqlField(orderedGroups = {@QuerySqlField.Group(name = "fullname_idx", 
order = 1)})
    @Name
    private String firstName;
    @QuerySqlField(index = true, orderedGroups = {@QuerySqlField.Group(name = 
"fullname_idx", order = 2)})
    @Name
    private String patronymic;

    public HumanNameModel() {

    }
...
 {code}
 

  was:
Can't select row with uuid predicate:

SELECT PARENTID FROM "HumanName".HUMANNAMEMODEL WHERE PARENTID = 
'e3f070fa78884fbbbaaca02d5338e217';

 

"class org.apache.ignite.IgniteCheckedException: Invalid flag value: -29"
{code:java}
// заполнитель кода
{code}
public abstract class GenericChildModel<T extends Serializable, P extends 
Serializable> implements Serializable \{ transient protected T id; protected 
transient AffinityKey<T> key; @QuerySqlField(notNull = true, orderedGroups = 
{@QuerySqlField.Group(name = "parent_version_idx", order = 0)}) protected P 
parentId; @QuerySqlField(notNull = true, orderedGroups = 
\{@QuerySqlField.Group(name = "parent_version_idx", order = 1, descending = 
true)}) protected Long version; transient protected P colocationId; public T 
getId() \{ return id; } public void setId(T id) \{ this.id = id; } public P 
getParentId() \{ return parentId; } public void setParentId(P parentId) \{ 
this.parentId = parentId; } public Long getVersion() \{ return version; } 
public void setVersion(Long version) \{ this.version = version; } public P 
getColocationId() \{ return colocationId; } public void setColocationId(P 
colocationId) \{ this.colocationId = colocationId; } public AffinityKey<T> 
key() \{ if (key == null) key = new AffinityKey<>(id, colocationId); return 
key; } public abstract IBase toFhirType(); public abstract boolean 
deepEquals(Object other); /** * Сравнивает списки моделей вызывая deepEquals 
без учета порядка элементов и учета служебных полей 
(version,parentId,colocationId,id) * * @param list1 список моделей * @param 
list2 список моделей * @param <C> тип модели * @param <T> тип ключа модели * 
@param <P> тип родительского ключа модели * @return true если равны */ public 
static <C extends GenericChildModel<T, P>, T extends Serializable, P extends 
Serializable> boolean deepEqualsModelList(List<C> list1, List<C> list2) \{ if 
(list1 == list2) { return true; } if (list1 == null || list2 == null || 
list1.size() != list2.size()) \{ return false; } for (C l1 : list1) \{ if 
(list2.stream().noneMatch(l1::deepEquals)) { return false; } } return true; }

 

 


> Ignite throws org.apache.ignite.IgniteCheckedException
> ------------------------------------------------------
>
>                 Key: IGNITE-10635
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10635
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.7
>         Environment: Ignite 2.7. JDK 1.8, Linux Mint
>            Reporter: Andrey
>            Priority: Major
>         Attachments: error.png
>
>
> Can't select row with uuid predicate:
> SELECT PARENTID FROM "HumanName".HUMANNAMEMODEL WHERE PARENTID = 
> 'e3f070fa78884fbbbaaca02d5338e217';
>  
> "class org.apache.ignite.IgniteCheckedException: Invalid flag value: -29"
> {code:java}
> public abstract class GenericChildModel<T extends Serializable, P extends 
> Serializable> implements Serializable {
>     transient protected T id;
>     protected transient AffinityKey<T> key;
>     @QuerySqlField(notNull = true, orderedGroups = {@QuerySqlField.Group(name 
> = "parent_version_idx", order = 0)})
>     protected P parentId;
>     @QuerySqlField(notNull = true, orderedGroups = {@QuerySqlField.Group(name 
> = "parent_version_idx", order = 1, descending = true)})
>     protected Long version;
>     transient protected P colocationId;
>     public T getId() {
>         return id;
>     }
>     public void setId(T id) {
>         this.id = id;
>     }
>     public P getParentId() {
>         return parentId;
>     }
>     public void setParentId(P parentId) {
>         this.parentId = parentId;
>     }
>     public Long getVersion() {
>         return version;
>     }
>     public void setVersion(Long version) {
>         this.version = version;
>     }
>     public P getColocationId() {
>         return colocationId;
>     }
>     public void setColocationId(P colocationId) {
>         this.colocationId = colocationId;
>     }
>     public AffinityKey<T> key() {
>         if (key == null)
>             key = new AffinityKey<>(id, colocationId);
>         return key;
>     }
> .... 
> public class HumanNameModel extends GenericChildModel<UUID, UUID> {
>     public static final String[] HUMAN_NAME_USE = {"usual", "official", 
> "temp", "nickname", "anonymous", "old", "maiden"};
>     @QuerySqlField
>     private Byte use;
>     @QuerySqlField(notNull = true, orderedGroups = {@QuerySqlField.Group(name 
> = "fullname_idx", order = 0)})
>     @NotNull
>     @Name
>     private String family;
>     @QuerySqlField(orderedGroups = {@QuerySqlField.Group(name = 
> "fullname_idx", order = 1)})
>     @Name
>     private String firstName;
>     @QuerySqlField(index = true, orderedGroups = {@QuerySqlField.Group(name = 
> "fullname_idx", order = 2)})
>     @Name
>     private String patronymic;
>     public HumanNameModel() {
>     }
> ...
>  {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to