나는 기능의 목록을 연결하기 위해 노력하고있어 기대 H2 내장 가능한 목록을 최대 절전 모드 (누구 내장 가능) 내 직원 엔티티와 H2 내에서이 그것이 "식별자""식별자"
인한 기대한다는 말에 불만 보인다 기준 : org.h2.jdbc.JdbcSQLException : SQL 문에 구문 오류 " departmentNumber 그런 INTEGER NOT NULL, ( EMPLOYEE_EMPLOYEEID VARCHAR (255) NOT NULL로, ACTIVE BOOLEAN NULL NOT 표 EMPLOYEE_FUNCTIONS를 작성, 설명 VARCHAR (255), ORDER [*] INTEGER NOT NULL ) "; 예상 "식별자";
다른 프로젝트에서 이미 그 일을했는데 왜 작동하지 않는지 알 수 없습니다.
Employee.java
@Entity
public class Employee extends AbstractScheduleEntity<EmployeeSchedule> {
public static final String ACOMBA_UNIQUE_FIELD = "acombaUnique";
@Id
@GenericGenerator(name = "sequence_id", strategy =
"ca.tecsar.core.sql.ServerSequenceGenerator")
@GeneratedValue(generator = "sequence_id")
@Column(name = "EmployeeID", unique = true, nullable = false)
private String employeeID;
@ElementCollection
private List<Function> functions;
//getter and setter
}
Function.java
@Embeddable
public class Function implements Serializable {
private int order;
private boolean active;
private String description;
private int departmentNumber;
//getter and setter
}
내가 필요하지 않았다 직원의 몇 가지 속성을 제거했습니다. 이 오류의 원인은 무엇입니까? 그것은 내 Employee에 String이라는 식별자를 가지고 있기 때문입니까? 만약 그렇다면 어떻게 Hibernate에 Employee_EmployeeID를 식별자로 추가 할 수 있다고 말할 수 있습니까? 감사합니다.
쿼리는 최대 절전 모드로 생성됩니다. – baskwo