I described the problem here: https://discourse.hibernate.org/t/problem-with-generate-id-in-hibernate-6/7369 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:
and
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). |