Why does hibernate create the id column when I specify another primary key?

0

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.

    
asked by el_odiado76 04.05.2017 в 15:41
source

0 answers