Closed hk-2keys closed 4 months ago
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 3.2.0
and 3.2.1
, using H2 and Postgres
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):
// Entities
AEntity(id: number, bEntity: BEntity, ...)
BEntity(cSet: Set<CEntity>, dSet: Set<DEntity>, ...)
CEntity(...)
DEntity(...)
// Tables
a(id, ...)
b(a_id, ...)
c(id, a_id, ...)
d(id, a_id, ...)
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 3.2.x
from 3.1.x
.
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?
Right now Spring Data JDBC only support collections on ONE level object A->B[]
, and not nested with two or more levelsA->B->C[]
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?
https://github.com/spring-projects/spring-data-relational/issues/1748 https://github.com/spring-projects/spring-data-relational/issues/1734 https://github.com/spring-projects/spring-data-relational/issues/1739 https://github.com/spring-projects/spring-data-relational/issues/1748 https://github.com/spring-projects/spring-data-relational/issues/1692
Yes, this will be looked into. Thanks for collecting all the related issues.
There are multiple issues with the same root cause here - will this ever been looked into? Right now Spring Data JDBC only support collections on ONE level object
A->B[]
, and not nested with two or more levelsA->B->C[]
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?
1748 #1734 #1739 #1748 #1692
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.
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