question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
mikereichecommented, Feb 2, 2022

btw - derived queries (those without an @Query definition) on a repository for an abstract entity class and the default type (i.e. no @TypeAlias) will never select any rows that have been saved by that repository because the _class = <entity-class-name> predicate will use the abstract class name, while the documents will have been saved with their concrete class name.

0reactions
mikereichecommented, Feb 4, 2022

February 18. https://calendar.spring.io/ (2021.1.x -> 4.3.x) I’ve updated 4.3x just now, the next 4.3.2-SNAPSHOT will have the change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking change: Static abstract members in interfaces - .NET
NET 6 previews a new feature where static interface members can be marked as abstract . This feature involves several changes to the...
Read more >
Need understanding on "Changes in abstract class will not ...
Changing default implementation is a non-breaking change - the code will continue to compile. 2 - An abstract class with only abstract methods ......
Read more >
Chapter 9. Issues Resolved in Fuse 7.0
Issue, Description. ENTESB-3684. New changes are not getting reflected If Switchyard Quickstart are modified and deployed to Fuse 6.2.
Read more >
Abstract classes that implement interfaces shouldn't require ...
Apart from boilerplate and maintenance burden on abstract class, this behavior also causes unnecessary breaking changes to upstream libraries ...
Read more >
Spring Boot Reference Documentation
The Spring Boot CLI (Command Line Interface) is a command line tool that you ... also update the state of the application, when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found