PersistenceException: ERROR executing DML bindLog[] error[Column 'XXX' specified twice]

Problem:

javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Column 'graphId' specified twice]

(...)
@Required
public String city;
@Required
public String birthdate;
@Required
public String username;
@Required
public String password;
public Long role_id;
@ManyToOne
@JoinColumn(name = "role_id")
public Role role;

Solution: 

Tell Hibernatee not to process the join column a "second time":

@ManyToOne
@JoinColumn(name = "role_id", insertable = false, updatable = false)
public Role role;

Comments

Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction