Hello!
can we use conditional delete in update
No, it strictly should be a valid DML expression.
you have to add update-per-row="true"
If you are using Oracle you can use like this:
HTML Code:
<int-jdbc:inbound-channel-adapter
query="SELECT ROWID row_id, USER_ID,BOOK_ID FROM BOOK WHERE ROWNUM <= 11"
channel="index-back-data" data-source="dataSource"
max-rows-per-poll="10"
update-per-row="true"
update="DELETE FROM BOOK WHERE ROWID = :row_id"
row-mapper="DataRowMapper">
<intoller fixed-delay="10000" />
</int-jdbc:inbound-channel-adapter>
From other side: doesn't it really work 'DELETE FROM BOOK WHERE USER_ID = :userId AND BOOK_ID = :bookId' despite the fact that 'bookId = null' ?
Have you tried it in the forehead?
Take care,
Artem