Skip to content
Advertisement

ManyToOne and Column Conflict [closed]

error : @Column(s) not allowed on a @ManyToOne property: com.spring.mysql.test.api.model.Lancamentos.categoria

    @ManyToOne
    @Column(name="id_categoria")
    private Categoria categoria;

Advertisement

Answer

Use @JoinColumn instead of @Column.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement