org.hibernate.id.IdentifierGenerationException: null id generated for:class org.fbb.domain.Heart

Stack Overflow | ylei | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    How to create a lazy loading enabled one-to-one relationships with shared primary key way

    Stack Overflow | 9 months ago | ylei
    org.hibernate.id.IdentifierGenerationException: null id generated for:class org.fbb.domain.Heart

    Root Cause Analysis

    1. org.hibernate.id.IdentifierGenerationException

      null id generated for:class org.fbb.domain.Heart

      at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId()
    2. Hibernate
      Cascade.cascade
      1. org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:103)
      2. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
      3. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
      4. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97)
      5. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
      6. org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:648)
      7. org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:640)
      8. org.hibernate.engine.spi.CascadingActions$5.cascade(CascadingActions.java:218)
      9. org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:398)
      10. org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
      11. org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:162)
      12. org.hibernate.engine.internal.Cascade.cascade(Cascade.java:111)
      12 frames