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

Vladimir Ozerov resolved IGNITE-6996.
-------------------------------------
    Resolution: Won't Fix

Not relevant at the moment.

> Smarter handling of id fields in SQL values
> -------------------------------------------
>
>                 Key: IGNITE-6996
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6996
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Alexander Paschenko
>            Priority: Major
>
> Consider such case:
> User wants to have a composite value (many value fields in {{QueryEntity}}) 
> with one field associated with value's id (most likely matching cache key 
> too).
> Currently in order to insert such an object we will have to do something like
> {{INSERT INTO Person(_key, id, name) values(1, 1, 'John')}}
> And there's no way to avoid such a redundant repeat of the same value.
> Suggested approach: I believe that we should specifically handle the case 
> when user specifies {{keyFieldName}} in configuration and specified field is 
> field of the value.
> In such case, we could just do {{INSERT INTO Person(id, name) values(1, 
> 'John')}} and derive {{_key}} value from {{id}} column. (And vice versa.)
> At a glance, this also will require following tweaks:
> - forbid performing SQL {{UPDATE}} on such column ({{id}} in above example);
> - on an {{INSERT}}, check that {{_key}} and {{id}} values are the same, if 
> both specified.



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

Reply via email to