'Integration Eclipse Collections with Spring Data JPA

is it possible integration eclipse collections with spring data jpa + hibernate?

for example:

import org.springframework.data.jpa.repository.JpaRepository;
import org.eclipse.collections.api.list.ImmutableList;

public interface UserRepository extends JpaRepository<User, Long> {

    ImmutableList<User> findByActiveTrue();

}


Solution 1:[1]

I don't believe this is possible today. Providing support for Immutable Collection types from different libraries has been discussed in an issue on the spring-data-commons project.

https://github.com/spring-projects/spring-data-commons/issues/1817

The issue was assigned in Dec. 2020.

Update (May 4th): There have been some updates in the past couple of days on the GitHub issue:

https://github.com/spring-projects/spring-data-commons/issues/1817#issuecomment-1117257169

It sounds like perhaps this question will eventually have a positive answer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1