0
我試圖用netbeans 8.1上的休眠4.3和MySQL 5.6生成我的持久層,但每次它創建重複的字段。休眠在Pojos上重複字段映射
這裏是我得到的一個例子:
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,同樣的問題發生。