0 Replies Latest reply on Feb 1, 2008 12:48 PM by stonebits

    avax.persistence.PersistenceException: org.hibernate.Propert

    stonebits

      I have a tree-like data structure (with cycles)

      Show (has many) submissions
      Submissions (has one) prices and (has one) artwork
      Prices (has one) Submission and (has one) artwork

      (aka the price points to both the artwork and the submission)

      I create a new submission/price pair in the .xhtml page

      <a:commandButton id="addANewSubmission" value="Add New Submission"
       action="#{showsHome.instance.addSubmissionPrice(submissionHome.createNewPricelessSubmission(), priceHome.createNewPrice())}" reRender="ajaxSubmission"/>


      which calls
       public void addSubmissionPrice(Submission newSubmission, Price newPrice) {
       this.submissions.add(newSubmission);
       newSubmission.setShows(this);
       newSubmission.addPrice(newPrice);
       }


      Everything works fine if I don't have a price (which is optional) any idea on what I'm doing wrong? Any ideas would be appreciated.
      BTW here's the complete error
      Exception during request processing:
      Caused by javax.servlet.ServletException with message: "#{showsHome.persist}: javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.rdfsg.artdb_seam2.Price.submission"
      
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      etc


      Thanks