ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Karachentsev <dkarachent...@gridgain.com>
Subject Error in JDBC store
Date Thu, 29 Dec 2016 08:23:58 GMT
Hi all!

According to this thread [1] in JDBC store configuration:
1. Map key and value fields to the same columns in DB.
2. Try to update data.
3. Got invalid SQL.

Let's see an pseudocode example of described use case.
KeyClass { field1; field2; field3 }, ValClass { field1; field2; field3 }

Map fields to DB table TABLE_NAME columns: field1 -> col1, field2 -> col2,
field3 -> col3.

User expects the following update request built by Ignite:
UPDATE TABLE_NAME SET col1=?, col2=?, col3=? WHERE (col1=?, col2=?, col3=?);

But Ignite checks that value object fields have the same mappings, throws
them away and builds wrong query:
UPDATE TABLE_NAME SET WHERE (col1=?, col2=?, col3=?);
That is obviously wrong.

Is there any reason to do so?
Probably, it is better to build query according to user mapping and
delegate verification to DB.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message