AdvancedAdvanced PostgreSQL
Spring Data JPA & PG: JSONB mapping (Part 12)
The query
SQL
-- Q: How does Hibernate interact with PostgreSQL regarding JSONB mapping?
@Entity
public class PracticeEntity {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
private Long id;
}Note
“Using GenerationType.SEQUENCE is vastly superior to IDENTITY in PostgreSQL for bulk inserts.