Struts Problem Report
Struts has detected an unhandled exception:
Messages:
ids for this class must be manually assigned before calling save(): com.hime.system.model.SysBranch
ids for this class must be manually assigned before calling save(): com.hime.system.model.SysBranch; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.hime.system.model.SysBranch
File: org/hibernate/id/Assigned.java
Line number: 56
之前是ID生成策略有问题,改过之后(如下的assigned)。又出现这个问题,求指导啊。下面是修改过的代码:
@Id @GeneratedValue(generator="custom-id")
@GenericGenerator(name="custom-id", strategy = "assigned")
@Column(name = "BRANCH_ID", unique = true, nullable = false, insertable = true, updatable = true, length = 30)
public String getBranchId() {
return this.branchId;
}
慕侠2389804
绝地无双
慕桂英3389331
相关分类