hibernate注解的问题
JPA的注解功能太少,hibernate那些独有的都没有。
我用hibernate的@entity发现怎么也不行,不自动生成表,用JPA的entity就行。能混合着用么?
//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; }}