hibernate 3.5.6 annotation 双向一对多的配法。
今天用hibernate 3.5.6 annotation 双向一对多时候出现了异常,Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:javax.persistence.OneToMany.orphanRemova()Z
上网一查发现是ejb3-persistence.jar的问题,解决方法是去掉ejb3-persistence.jar,使用hibernate-jpa-2.0-api-1.0.0.[......]