Closed rvanheest closed 9 years ago
Turned out it was the UPDATE
trigger in the database that was not complete.
Debiteur
without btwNummer
Debiteur without
btwNummer`, everything works fine.Debiteur
with btwNummer
, then a row needs to be inserted into the BtwDebiteur
table.Debiteur
with btwNummer
Debiteur
without btwNummer
, then a row needs to be deleted from the BtwDebiteur
table.Debiteur
with btwNummer
, then a row needs to be updated in the BtwDebiteur
table.So 4 triggers have to be created for this UPDATE
.
In order to do so, we need to store the debiteurID
as an Optional<Integer>
in the Debiteur
object and retrieve it when building these queries. Also the debiteurID
needs to be included in the database's debiteur view.
All fixed in f71ff830418dd26f4d0c893ad23c9bfa38015470
Update queries are not processed properly. When an update is done in the settings screen, the update is applied. However, when the application is restarted, the updates seem to be undone.
Presumably these changed are applied locally but are not properly executed in the database.