2016-08-31 6 views
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 버전의 최신 절전 모드로 시도했는데 같은 문제가 발생한다.

답변

0

이전 버전의 hibernate에서 새로운 버전 (4.3 to 5.2)으로 hibernate.hbm2ddl.auto *가 ** update로 설정 될 때이를 업데이트하면 최대 절전 모드에서 강제로 제약 조건을 다시 생성하고, 당신이 persistence layer를 다시 생성하려고 시도 할 때 DB에서 오래된 것들을 남겨둔다. 최대 절전 모드는 오래된 제약 조건을 관계로 이해하지 못하고 새로운 속성을 생성한다.

관련 문제