Brent Watson (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTE0MjVkMzZm...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16758?atlOrigin=eyJpIjoiYTE0Mj...
) HHH-16758 (
https://hibernate.atlassian.net/browse/HHH-16758?atlOrigin=eyJpIjoiYTE0Mj...
) Hibernate throws error when using @ElementCollection (
https://hibernate.atlassian.net/browse/HHH-16758?atlOrigin=eyJpIjoiYTE0Mj...
)
Issue Type: Bug Affects Versions: 6.2.4 Assignee: Unassigned Components:
hibernate-entitymanager Created: 06/Jun/2023 07:00 AM Environment: Hibernate 6.0.0, Spring
3, Java 17, Kotlin Labels: breaking-change Priority: Critical Reporter: Brent Watson (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
)
When using @ElementCollection with Set = SetOf() I get
org.hibernate.NotYetImplementedFor6Exception: Only support for basic-valued, entity-valued
and embedded model-parts have been implemented : userNames [PluralAttribute]
This worked before upgrading to hibernate 6
@SqlResultSetMappings(
SqlResultSetMapping(
name = "Mapping.User",
entities = [
EntityResult(
entityClass = User::class,
fields = [
FieldResult(name = "id", column = "id"),
FieldResult(name = "userNames", column = "user_names"),
]
)
],
),
SqlResultSetMapping(
name = "Mapping.User.count",
columns = [ColumnResult(name = "rowCount")]
)
)
@Entity
@Table(name = "users")
data class User(
@Id
@GeneratedValue(generator = "UUID")
@GenericGenerator(
name = "UUID",
strategy = "org.hibernate.id.UUIDGenerator"
)
@Column(name = "id")
var id: UUID = UUID.randomUUID(),@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(
name = "users_names",
joinColumns = [JoinColumn(name = "user_id", referencedColumnName =
"id")]
)
@Column(name = "user_names")
var userNames: Set<String> = setOf(),
)
(
https://hibernate.atlassian.net/browse/HHH-16758#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16758#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#100225- sha1:3b7cdab )