Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not update fields that haven't changed #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guss77
Copy link
Contributor

@guss77 guss77 commented Jan 11, 2024

Currently "unchanged" fields are just the primary key fields that get reset a few LoCs above.

In the future, one may have a logic to detect actual changes and create records where the POJO fields that haven't changed are correctly reset as well.

This may be very useful to support MySQL/MariaDB TIMESTAMP fields with an ON UPDATE CURRENT_TIMESTAMP() feature, which are currently being overwritten by the old value in the POJO and there for are broken with vertx-jooq.

Which at this point means the primary key fields. In the future, one may have a logic to detect actual changes and create records where the Pojo fields that haven't changed are not set.

This may be very useful to support MySQL/MariaDB `TIMESTAMP` fields with an `ON UPDATE CURRENT_TIMESTAMP()` feature, which are currently being overwritten by the old value in the POJO and there for are broken with vertx-jooq.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant