I'm working on OpenXava
, a framework based on Java
, and when using Hibernate
I create a column called id in database ( MySql
), even if specific in the class that the key would be is called login .
I put the code:
@Entity
@Table(name = "categoria")
public class Categoria {
@Id
@Column(name = "login", unique=true, table = "categoria")
private String login;
@Column(name = "categoria", table = "categoria")
private String categoria;
@Column(name = "servicio", table = "categoria")
private String servicio;
@Column(name = "correo", table = "categoria")
private String correo;
// Getters and Setters...
}
Am I defining something wrong? What could be the cause? Thanks for the help, I'm attentive if you need something more.