[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - avax.persistence.PersistenceException: org.hibernate.Propert
stonebits
do-not-reply at jboss.com
Fri Feb 1 12:48:08 EST 2008
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125622#4125622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125622
More information about the jboss-user
mailing list