Moritz Becker (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZjUwZTM2YTBm...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16993?atlOrigin=eyJpIjoiZjUwZT...
) HHH-16993 (
https://hibernate.atlassian.net/browse/HHH-16993?atlOrigin=eyJpIjoiZjUwZT...
) Collection converter on Collection typed attribute not working (
https://hibernate.atlassian.net/browse/HHH-16993?atlOrigin=eyJpIjoiZjUwZT...
)
Issue Type: Bug Affects Versions: 6.2.7 Assignee: Unassigned Attachments:
collection-converter-issue-reproducer.zip Components: hibernate-core Created: 25/Jul/2023
22:52 PM Priority: Major Reporter: Moritz Becker (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
When annotation a java.util.Collection typed entity attribute with a Hibernate collection
converter the entity loading / attribute conversion fails with a ClassCastException.
Changing the attribute declaration to a List or a Set fixes the issue. This used to work
in Hibernate 5.6.
@Entity
public class Person {
@Id
private Long id;
@Column
@Convert(converter = DogListConverter.class)
// Change declaration to List<Dog> to make the test pass
private Collection<Dog> dogs = new ArrayList<>(0);
}
collection-converter-issue-reproducer.zip (
https://hibernate.atlassian.net/rest/api/3/attachment/content/50529 )
(
https://hibernate.atlassian.net/browse/HHH-16993#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16993#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100233- sha1:62cfdef )