BundledProductData是具有复合主键BundledProductId的实体。和ProductBundleData作为Id的复合Id类。org.hibernate.NonUniqueObjectException: A different object with the same identifier value was alreadyorg.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThr
理想情况下,我希望将它们保存在一个事务中,但是,我始终得到一个org.hibernate.NonUniqueObjectException: a different object with the samename="id" column="sub_dis_id" unsaved-value="0">
<generator class="increment"/></id>
我的数据库中有一个带有主组合键的表,当我用Hibernate对它建模时,我使用了@EmbeddedId & @Embedable。此复合主键的一列具有@GeneratedValue(strategy = GenerationType.IDENTITY)生成的值。当我试图在数据库中创建两个新对象时,出现了如下错误:
org.hibernate.NonUniqueObjectException: A different object with the same id