Skip to content

Breaking change from 4.2.7-SNAPSHOT to 4.3.1 for repositories with abstract or interface entities #1315

Closed
@JesusTheHun

Description

@JesusTheHun

This repository method causes an issue with 4.3.1 but not with 4.2.7-SNAPSHOT :

@Query("#{#n1ql.selectEntity} USE KEYS $1")
List<BaseManageableEntity> findAllByIdIn(List<String> ids);

This method can return a variety of types of documents all extending the BaseManageableEntity abstract class.
With 4.2.7-SNAPSHOT the returned objects have the type of their inner class, A or B both extending BaseManageableEntity, the list carries the lower bound and is of type List<BaseManageableEntity>.
With 4.3.1 the returned method tries to deserialize the documents as instances of BaseManageableEntity causing an error, since BaseManageableEntity is an abstract class.

The behavior of 4.2.7-SNAPSHOT is the correct behavior imo, since it's easier and more natural to go in this direction than the other one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionA regression from a previous release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions