#3129 Fix for 15.x to verify DBJson dirtiness using same field orderi…#3402
#3129 Fix for 15.x to verify DBJson dirtiness using same field orderi…#3402AntoineDuComptoirDesPharmacies wants to merge 1 commit intoebean-orm:ebean-15xfrom
Conversation
…ld ordering on both sides (due to PostgreSQL reordering fields for JsonB types)
|
Hi @rbygrave, We do not know why the pipeline is not successful on kotlin build. You will certainly have a better insight about this failure. Thanks in advance. |
|
Ah right, a couple of things here.
So your PR should be all good in the sense that the CI didn't pass because of my mistake. Now, currently we operate with all changes going to master branch and then those changes are merged back to ebean-15x branch. That is, any and all changes are applied to master and thus go into 14.x, 14.x-javax and 15.x ... so all new features and bug fixes go into master. When we release we release all 3 of these versions and they are all aligned in terms of features / bug fixes / version numbers ... with the exception that 15.x has some functionality removed. So in general we want all PRs to be applied back to master. As part of the release I merge those changes to ebean-15x branch and resolve any conflicts as needed and release. I'll look to merge that fix into the ebean-15x branch, but I think we really want this change to be merged back to master. I don't think we can just re-target this PR to master because it will then look to bring in the changes in ebean-15x, so I think we need a new PR based off master with these changes in it. Can I get you to create a new PR based off master branch with these changes? (and looking to merge those changes into master instead of ebean-15x). |
This pull request aim to fix a problem (#3129) where
@DbJsonBfields are always considered dirty on load if the order of their properties do not match fields ordering from data stored in Postgres.This is due to the fact that Postgres is re-ordering the fields if column type is a JsonB in order to optimize storage / index / etc...
To solve this problem, we parse/format the value coming from
readSetmethod in order to be sure that comparison will be done using Java Jackson encoded JSON on both side.