Skip to content

support multiple entity references of same type [DATAJDBC-125] #357

@spring-projects-issues

Description

@spring-projects-issues

Jens Schauder opened DATAJDBC-125 and commented

I did not test this, but if I understand the code correctly which I wrote for DATAJDBC-112 if an entity contains multiple references to entities of identical type, the repository will break, because the property name is not part of the column name used for the FK.

Example

A Customer hast two properties of type Address (home and work.

The EntityRowMapper will try to load both properties by joining from Customer.id to Address.customer or similar. Instead something should be used like Address.home_customer.


Referenced from: pull request #91

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions