-
Notifications
You must be signed in to change notification settings - Fork 346
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
Spring Data JDBC @Embedded entity with @MappedCollection #1692
Comments
Hi I think I have a similar use case and since upgrading it seems im encountering the same thing. |
I'm also encountering this when trying to update, using the H2 driver in test. |
Hi, I'm also running into the same issue when trying to upgrade. |
I'm also encountering this issue in |
Also having the same issue. Any updates here? |
We are having the same issue with the following relationships (with a 1:1 relationship from A to B):
When I'm now fetching a list of AEntity, the cSet and dSet of the bEntity are empty, although the database is populated. After debugging the MappingJdbcConverter, I think the line @hk-2keys linked is the same culprit for our problem, as the property owner of CEntity is BEntity, which doesn't have an ID. This problem also started when upgrading to |
This is a real issue for us - any ETA here? |
Hi @schauder any estimation about the resolution of this? |
Hi, I found this error in 3.2.3 version. |
There are multiple issues with the same root cause here - will this ever been looked into? It is pretty common to have multiple levels of objects with subsequent collections. I would call this a major issue for the framework and a "must have" feature to use in production. Is anyone working on it, or should this be listed as a bug that won't be fixed? |
Yes, this will be looked into. |
Similar issue: #1771 |
This is exactly the issue I reported also! It's a major, critical issue or bug or missing feature. I cannot consider using data JDBC in any aspect with that major lack of support. |
Construction of the backreference assumed that the table holding the parent of the foreign key is the actual parent property. This is now corrected by using the correct API to identify the ancestor which holds the id. Closes: #1692
I can confirm that after upgrading to Spring Boot 3.3.0, our problems were fixed. Thanks for addressing this issue. |
When updating from
3.1.6
to3.2.0
I've noticed a behaviour change in the following scenario:When using
RootEntityRepository.save(RootEntty)
with3.1.6
and3.2.0
it works as expected, and when usingRootEntityRepository.findById(String)
with3.1.6
it works as expected. However, when usingRootEntityRepository.findById(String)
with3.2.0
it encounters the following exception:I would expect the query to be
since
idColumn = "root_id"
is used in the@MappedCollection
.I believe I've narrowed down the reason for this to this condition in
MappingJdbcConverter
since the property owner appears to be theEmbeddedEntity
which doesn't have its own ID.Note: This occurred with the
org.postgresql:postgresql:42.6.0
driver and CockroachDBv23.1.2
The text was updated successfully, but these errors were encountered: