I have a model class that is mapped to a postgres database using hibernate. My model class is:
@Entity
@Table(name=\"USER\")
public class User {
@Id
@G
For people getting this exception ,In postgres Whenever you write an Entity Class try to associate it with the correct schema (where your table is present), like this:
@Entity
@Table(name = "user", schema = "users_details")
public class User implements Serializable{
@Column(name = "id")
Long id; //long is not recommended
// Other data
}
As @YCF_L has said Don't use Upper_case letters in a table name or column name otherwise you will get this exception.
This convention becomes more important when their is a scenario where you have to auto generate the tables from entity classes or vice-versa.