You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergey Kalashnikov (Jira)" <ji...@apache.org> on 2020/06/10 13:12:00 UTC
[jira] [Updated] (IGNITE-13142) SQL constraint not null added on
key prevents correct inserts
[ https://issues.apache.org/jira/browse/IGNITE-13142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Kalashnikov updated IGNITE-13142:
----------------------------------------
Attachment: SqlNotNullKeyFielfTest.java
> SQL constraint not null added on key prevents correct inserts
> -------------------------------------------------------------
>
> Key: IGNITE-13142
> URL: https://issues.apache.org/jira/browse/IGNITE-13142
> Project: Ignite
> Issue Type: Bug
> Reporter: Sergey Kalashnikov
> Priority: Major
> Attachments: SqlNotNullKeyFielfTest.java
>
>
> It is possible to configure {{QueryEntity}} so that subsequent inserts would fail.
> - lowercase {{keyFieldName}}
> - not null constraint on {{keyFieldName}}
> {code:java}
> new QueryEntity()
> .setTableName("Person")
> .setKeyFieldName("id")
> .setKeyType("java.lang.Integer")
> .setValueType("Person")
> .setFields(new LinkedHashMap<>(
> F.asMap("id", "java.lang.Integer",
> "name", "java.lang.String",
> "age", "java.lang.Integer")))
> .setNotNullFields(F.asSet("id", "name", "age"))))
> {code}
> The following SQL produces error: Null value is not allowed for column 'ID'
> {code}
> insert into Person (id, name, age) values (1, 'John Doe', 30)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)