Chris Lenz (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZjNiMWY1MmMz...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16793?atlOrigin=eyJpIjoiZjNiMW...
) HHH-16793 (
https://hibernate.atlassian.net/browse/HHH-16793?atlOrigin=eyJpIjoiZjNiMW...
) @TableGenerator on MappedSuperclass results in multiple inserts (
https://hibernate.atlassian.net/browse/HHH-16793?atlOrigin=eyJpIjoiZjNiMW...
)
Issue Type: Bug Assignee: Unassigned Components: hibernate-orm-modules Created:
14/Jun/2023 03:18 AM Environment: We are using Quarkus Hibernate ORM version 3.0.3 Final.
JavaVersion.VERSION_17
database Postgres 14 Priority: Major Reporter: Chris Lenz (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
We have
@MappedSuperclass
@TableGenerator(name = "Entity.Sequence",
schema="xxx",
table = "sequence",
initialValue = 1,
allocationSize = 100,
pkColumnName = "name",
pkColumnValue = "id",
valueColumnName = "count")
public class AbstractEntity implements Serializable{
and
@MappedSuperclass
public abstract class
VersionableEntity
extends
AbstractEntity
and 3 entities like:
@Entity
...
public class XXX extends VersionableEntity{
The problem we face is that now the SchemaExporter generates one Schema for the Sequence
Table, that's ok, but it generates 3 inserts into the table:
insert into xxx.sequence(name, count) values ('id',0);
insert into xxx.sequence(name, count) values ('id',0);
insert into xxx.sequence(name, count) values ('id',0);
(
https://hibernate.atlassian.net/browse/HHH-16793#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16793#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#100226- sha1:c25eebb )