Skip to content

EntityRowMapper can not extract AggregateReference field for immutable entity [DATAJDBC-428] #649

@spring-projects-issues

Description

@spring-projects-issues

MyeongHyeonLee opened DATAJDBC-428 and commented

EntityRowMapper throws exception for Immutable entity contains AggregateReference.

 

 

@RequiredArgsConstructor
class Immutable{ 
    private final @Id Long id;
    private final String name;
    private final AggregateReference<Trivial, Long> trivialId; 
}
 
Immutable entity = entityRowMapper.mapRow(rs, 1);
 
// throws exception
// org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [org.springframework.data.jdbc.core.mapping.AggregateReference$IdOnlyAggregateReference<?, ?>] to type [java.lang.Long]

 

 


Affects: 1.1 GA (Moore)

Referenced from: pull request #172, and commits b602225, 448f0e0, cef4152, 1a3d2b0

Backported to: 1.1.1 (Moore SR1)

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions