【发布时间】:2016-08-31 16:45:12
【问题描述】:
我正在尝试在 netbeans 8.1 上使用 hibernate 4.3 和 mysql 5.6 生成我的持久层,但每次它都会创建重复的字段。
这是我得到的一个例子:
private Set<Cliente> clientes = new HashSet<Cliente>(0);
private Set<Cliente> clientes_1 = new HashSet<Cliente>(0);
private Set<Compra> compras = new HashSet<Compra>(0);
private Set<Compra> compras_1 = new HashSet<Compra>(0);
private Set<Cotizacion> cotizacions = new HashSet<Cotizacion>(0);
private Set<Cotizacion> cotizacions_1 = new HashSet<Cotizacion>(0);
private Set<Credito> creditos = new HashSet<Credito>(0);
private Set<Credito> creditos_1 = new HashSet<Credito>(0);
private Set<Cuenta> cuentas = new HashSet<Cuenta>(0);
private Set<Cuenta> cuentas_1 = new HashSet<Cuenta>(0);
这个问题存在于hibernate生成的每个实体上。我还尝试了最新的休眠版本 5.2 并且发生了同样的问题。
【问题讨论】:
标签: java-8 hibernate-mapping netbeans-8