Hi there .. I use hibernate and hibernate.hbm2ddl.auto to deploy the entities to my postgresql db. The problem is that for one attribute in my entity, hibernate generates two columns in database. For example
Code:
@Entity
public class Person{
private String myName;
}
Then in the database I will get two columns. One with name
myname and one with name
my_name. The same happens with tables. If I have a table with name
PersonInfo then I will end up with two same tables ... One with name
personinfo and one with name
person_info.
my configuration
Code:
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=update
If I set the @Column annotation to each field with a table field then problem is resolved .. but I really want to skip this. For example if I do something like
Code:
@Column(name = "my_name")
private String myName;
Then it's fine. The same goes for tables by using @Table(name = "person_info")
What am I doing wrong