AdvancedAdvanced PostgreSQL

Spring Data JPA & PG: Enum handling (Part 3)

The query

SQL
-- Q: How does Hibernate interact with PostgreSQL regarding Enum handling?
@Entity
public class PracticeEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private Long id;
}
Tested against PostgreSQL 16

Note

Using GenerationType.SEQUENCE is vastly superior to IDENTITY in PostgreSQL for bulk inserts.