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

UnexpectedAccessToTheDatabase error #2066

Merged
merged 4 commits into from
Jan 20, 2025
Merged

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Jan 20, 2025

Fix #2006
Supersedes #2065

@dreab8, Could you check if the changes I made make sense to you, please?
Overall, the PR was really good. But, reviewing it, I've noticed some errors already present in the code base and a small error in your original PR.

I've tried to keep everything in separate commits:

return loop(
original.entrySet(), entry -> {
final Map.Entry<Object, Object> me = entry;
return getReplace( persister.getIndexType(), me.getKey(), owner, session, copyCache )

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
CollectionPersister.getIndexType
should be avoided because it has been deprecated.
final Map.Entry<Object, Object> me = entry;
return getReplace( persister.getIndexType(), me.getKey(), owner, session, copyCache )
.thenCompose( key -> getReplace(
persister.getElementType(),

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
CollectionPersister.getElementType
should be avoided because it has been deprecated.
@DavideD DavideD merged commit bba2f99 into hibernate:main Jan 20, 2025
19 checks passed
@DavideD
Copy link
Member Author

DavideD commented Jan 20, 2025

Aargh... the issue wasn't #2006 but #2026

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.

UnexpectedAccessToTheDatabase error when merging a detached entity with a ToMany association
2 participants