-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: sequences should be automatically added to a table for postgres compatibility #26730
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-tools-hibernateIssues that pertain to Hibernate integration.Issues that pertain to Hibernate integration.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
This came out of hibernate's test suite, the following tests fail:
- org.hibernate.engine.spi.ExtraStateTest shouldMaintainExtraStateWhenUsingIdentityIdGenerationStrategy
- org.hibernate.id.CreateDeleteTest createAndDeleteAnEntityInTheSameTransactionTest
- org.hibernate.id.FlushIdGenTest testPersistBeforeTransaction
Due to a sequence not existing.
create table ChineseTakeawayRestaurant (
id bigserial not null,
gobelinStars int4 not null,
primary key (id)
)
insert into ChineseTakeawayRestaurant (gobelinStars)
values 3
select currval('ChineseTakeawayRestaurant_id_seq')Postgres automatically creates a sequence whenever a serial or big serial type is used. We don't do this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-tools-hibernateIssues that pertain to Hibernate integration.Issues that pertain to Hibernate integration.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)