Hi All,

UpdateGenerator.getUpdateCommand()
- Here the logic to form update statement is such that for forming WHERE
CLAUSE,
it first iterates over PKs and then the columns which are undergoing
changes.
In case where, update is occurring on a table row which does not have a PK,
the statement
getting formed is syntactically wrong.

e.g. say table OrderDetails{ORDER_ID, PRODUCT_ID, PRICE} does not have any
PK
and the update is to update ORDER_ID to a new value, then the update
statement
getting formed is
update ORDERDETAILS set ORDER_ID = ? where  and ORDER_ID = ?
which is syntactically wrong.

A simple check on PK list emptiness will rectify this.
Shall I open a JIRA and fix this issue?

Regards,

Amita

Reply via email to