-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Mapping collections to SQL arrays does not work with repositories #3356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for getting in touch. Which version of data-jpa are you using? Can you please provide the full stacktrace, |
I used Spring Boot 3.2.2. To reproduce, simply startup an application with these two classes: demo.zip Entity: package com.adsoul;
import java.util.SortedSet;
import java.util.TreeSet;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
@Entity
@Table(name = "my_entity")
public class MyEntity {
@Id
@Column(name = "id", nullable = false)
@GeneratedValue
private Long id;
// This automatically maps to a SQL array.
@Column(name = "ids")
private SortedSet<Long> ids = new TreeSet<>();
} Repository: package com.adsoul;
import java.util.SortedSet;
import org.springframework.data.repository.Repository;
public interface MyRepository extends Repository<MyEntity, Long> {
MyEntity findByIds(SortedSet<Long> ids);
} Stacktrace:
|
Thank you @markusheiden - seems to be an unintended side effect of #1478. We'll get this fixed. |
When mapping collections to SQL arrays like this with Hibernate 6.4
a repository with queries against that column cannot be created
results in
The text was updated successfully, but these errors were encountered: