Hibernate ignores the schema name while calling nextval() - from postgres 12

135 Views Asked by At

My pojo definition worked fine till I used Postgres 9.x, When I changed the database to postgres 12 I get Sequence not found error when inserting a new row to a table. When I debugged the sql statements run in the database I found that hibernate ignored the schema name.

Postgres 9 : select nextval('ita.ita_settings_is_is_id_seq').... Postgres 12: select nextval('ita_settings_is_is_id_seq')....

My Pojo definition is as follows

@Entity
@Table(name = "ita.ita_settings_is")
@SequenceGenerator(name = "settingItaIdSeq", sequenceName = "ita.ita_settings_is_is_id_seq", initialValue = 1, allocationSize = 1)
public class itaSettings  implements Serializable {


 private static final long serialVersionUID = 1L;

 @Id
 @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "settingitaIdSeq")
 @Column(name = "is_id")
 private int id;
0

There are 0 best solutions below