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

JSON parameter binding of Map fields is no longer consistent and causing extra updates #518

Closed
tanadeau opened this issue Nov 30, 2022 · 2 comments

Comments

@tanadeau
Copy link

After upgrading to 2.20.0 from 2.19.2, the binding for JSON parameters is no longer consistent when used with Map fields in entities. This is causing an unnecessary update after every insert and also extraneous updates for other entities in the session.

For example, in the insert operation the parameter is bound as:

2022-11-30 12:50:22.255 [accountName=admin] TRACE 55394 --- [nio-8080-exec-7] o.h.type.descriptor.sql.BasicBinder      : binding parameter [18] as [OTHER] - [{9afc49ea-d869-4e50-ab1c-05af93dfaf8e=[{creatorId=1ed70d69-2a4b-6fe0-bd04-7effac365278, createdAt=2022-11-30T12:50:22.142682-05:00, lastModifiedById=1ed70d69-2a4b-6fe0-bd04-7effac365278, lastModifiedAt=2022-11-30T12:50:22.142682-05:00, value={repeatableSectionInstanceId=null, autoPopulated=false, value=12616541, fieldType=TEXT}}]}]

However, in the update that immediately follows it, the JSON column is updated with a parameter bound as:

2022-11-30 12:50:22.271 [accountName=admin] TRACE 55394 --- [nio-8080-exec-7] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [OTHER] - [{9afc49ea-d869-4e50-ab1c-05af93dfaf8e=[ReportEntityValueEntry(creatorId=1ed70d69-2a4b-6fe0-bd04-7effac365278, createdAt=2022-11-30T12:50:22.142682-05:00, lastModifiedById=1ed70d69-2a4b-6fe0-bd04-7effac365278, lastModifiedAt=2022-11-30T12:50:22.142682-05:00, value=ReportEntityValueText(repeatableSectionInstanceId=null, autoPopulated=false, value=12616541))]}]

I believe this may be due to the changes for #494.

@vladmihalcea
Copy link
Owner

A replicating test case id needed for this use case. You can use this test case as a reference for asserting the number of statements that get executed.

@vladmihalcea
Copy link
Owner

No replicating test case was provided. I'll reopen it once an integration test is created to prove the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants