1 Reply Latest reply on Dec 30, 2005 9:22 PM by epbernard

    TransientObjectException: object references an unsaved trans

    danjourno

      TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: package.path.Contact

      I have a persistence object "Affiliate" that has a child object "Contact".

      This is shown in my contact object as

      @OneToMany(fetch=FetchType.LAZY,cascade=CascadeType.ALL, mappedBy="contact")
       public java.util.List<Affiliate> getAffiliate() {
       return affiliate;
       }


      I am populating a contact object and attaching to the affiliate object and trying to persist by running

      em.persist(affiliate);


      it compiles and deploys fine.. but when i run it i get the above error.

      Any ideas what this might be? or how i can solve it?

      Regards
      Dan