Skip to content

@Query with select * on aggregate with sub entities throws [DATAJDBC-494] #719

Closed
@spring-projects-issues

Description

@spring-projects-issues

Veli-Pekka Muli opened DATAJDBC-494 and commented

Not sure if this is supposed to work like this, but it's definitely surprising behavior and not documented. There is an example of a query like this on Spring Data JDBC's GitHub page: @Query("SELECT * FROM person WHERE lastname = :lastname"). 

If entity Address would be part of the Person aggregate then I would get exception like: org.postgresql.util.PSQLException: The column name address_person_id was not found in this ResultSet. So apparently the object mapping logic expects specific aliases for the columns


Affects: 1.1.4 (Moore SR4)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions