日期:2014-05-20 浏览次数:20608 次
//optimisticLock 这属性只有hibernate有,fetch也是,怎么能同时使用啊?? @javax.persistence.Entity @org.hibernate.annotations.Entity(optimisticLock = OptimisticLockType.VERSION) @javax.persistence.Table(name = "TB_CUSTOMER", schema = "PBUSER") @org.hibernate.annotations.Table(appliesTo = "cc", fetch = FetchMode.SELECT) public class Customer { private int id; @GeneratedValue @Id public int getId() { return id; } public void setId(int id) { this.id = id; } }