Danilov Roman (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYmVlMTFjZmM2...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16285?atlOrigin=eyJpIjoiYmVlMT...
) HHH-16285 (
https://hibernate.atlassian.net/browse/HHH-16285?atlOrigin=eyJpIjoiYmVlMT...
) Property of on-execution generated embeddable is not generated (
https://hibernate.atlassian.net/browse/HHH-16285?atlOrigin=eyJpIjoiYmVlMT...
)
Issue Type: Bug Affects Versions: 6.2.0.CR3 Assignee: Unassigned Attachments:
hibernate-orm-6.zip Components: hibernate-core Created: 11/Mar/2023 05:10 AM Priority:
Major Reporter: Danilov Roman (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
I described the problem here:
https://discourse.hibernate.org/t/problem-with-generate-id-in-hibernate-6... (
https://discourse.hibernate.org/t/problem-with-generate-id-in-hibernate-6... )
I looked a little, the error occurs when hibernate tries to process a property in an
entity by type:
@ManyToOne
@JoinColumns({
@JoinColumn(name = "channelId" , referencedColumnName =
"channel_id" ),
@JoinColumn(name = "messageId" , referencedColumnName = "id" )
})
private ChannelMessage message;
And inside ChannelMessage these fields:
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
private long id;
and
@Generated(GenerationTime.INSERT)
private long channelId;
And when hibernate processes these fields, generatorCreator field is filled only
for{{channelId}}. Because in PropertyBinder class in generatorCreator method it looks for
the ValueGenerationType.class annotation (or child).
But maybe I didn't fully understand how it should actually work
I have attached test cases (may need to run a couple of times).
(
https://hibernate.atlassian.net/browse/HHH-16285#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16285#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#100217- sha1:dd34e91 )