Hibernate 7 sequence generator broken

The sequence generator in Hibernate 7 is broken.

import static org.hibernate.id.OptimizableGenerator.INCREMENT_PARAM;
import static org.hibernate.id.OptimizableGenerator.OPT_PARAM;
import static org.hibernate.id.enhanced.SequenceStyleGenerator.SEQUENCE_PARAM;

@Entity
public class Foo {
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "gen")
	@GenericGenerator(
			name = "gen",
			type = SequenceStyleGenerator.class,
			parameters = {
					@Parameter(name = SEQUENCE_PARAM, value = "seq"),
					@Parameter(name = INCREMENT_PARAM, value = "10"),
					@Parameter(name = OPT_PARAM, value = "pooled-lo")
			})
	private Long id;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
}

Hibernate 6:

create sequence seq start with 1 increment by 10

Hibernate 7:

create sequence gen start with 1 increment by 50

Two things to notice here:

  1. The sequence name is wrong with Hibernate 7. The generator name is used instead of the sequence name.
  2. Other parameters like increment_size are ignored.

Hibernate docs example: Hibernate ORM User Guide

Please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.

The class I posted above is the reproducer. Just start the application/test with hbm2ddl turned on.

Thanks for the reproducer, but we prefer that you create a Jira and attach the reproducer there. That way, you can also get notified about updates on the Jira ticket.

I did that in the past and I have the feeling that no one looks at these tickets (or way less often). Here in the forum I at least know that you are regularly checking.

Here are two examples:

Over three years and not even a single comment on them. No one looks at these. Both have a reproducer attached.

It’s not that we’re not looking, but there is simply too much work for us (the small Hibernate team).
Some community members try to pick up Jira tickets and create a PR with a fix for the problem, usually for stuff they care about themselves. After all, this is an open source project.
If you are a Red Hat or IBM customer, you might be able to request a support ticket to be created for these issues. Then we could prioritize your requests, but until then, you will have to wait until someone from the community picks it up or we (the Hibernate team) find time to investigate.