I have two questions:<br><br>1) I thought the entity at the source end of a OneToMany defined by annotations didn&#39;t care about it&#39;s collection and would ignore updates to the collection? (this is the first problem, I got around it by settings&nbsp; cascade = CascadeType.ALL because if it does persist it&#39;s list that&#39;s not a bad thing, it&#39;s just not what I was expecting)<br>
<br>2) After doing that, I get the following error.&nbsp; As far as I can tell all my Entities have generated ids, so I don&#39;t really undefrstand how I could have an object with a null id other than the fact that it&#39;s null because it has yet to be populated with a generated id.<br>
<br>00:41:15:ERROR org.hibernate.AssertionFailure (AssertionFailure.java:22) - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)<br>org.hibernate.AssertionFailure: cannot copy a reference to an object with a null id<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.type.EntityType.replace(EntityType.java:255)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.type.AbstractType.replace(AbstractType.java:153)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.type.TypeFactory.replaceAssociations(TypeFactory.java:564)<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:366)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:195)<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:123)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:677)<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:661)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:665)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:228)<br>
&nbsp;&nbsp;&nbsp; at com.tmdworldwide.projectmanager.persist.BaseDao.save(BaseDao.java:37)<br>&nbsp;&nbsp;&nbsp; at com.tmdworldwide.projectmanager.web.product.ProductActionBean.createProject(ProductActionBean.java:49)<br>&nbsp;&nbsp;&nbsp; at com.tmdworldwide.projectmanager.web.product.CreateTrifoldBrochureActionBean.createProject(CreateTrifoldBrochureActionBean.java:60)<br>
&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:597)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:442)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)<br>
&nbsp;&nbsp;&nbsp; at org.stripesstuff.plugin.security.SecurityInterceptor.interceptEventHandling(SecurityInterceptor.java:191)<br>&nbsp;&nbsp;&nbsp; at org.stripesstuff.plugin.security.SecurityInterceptor.intercept(SecurityInterceptor.java:123)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:440)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:285)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:167)<br>&nbsp;&nbsp;&nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)<br>
&nbsp;&nbsp;&nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br>
&nbsp;&nbsp;&nbsp; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)<br>
&nbsp;&nbsp;&nbsp; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)<br>&nbsp;&nbsp;&nbsp; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)<br>&nbsp;&nbsp;&nbsp; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)<br>
&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Thread.java:637)<br>00:41:15: WARN net.sourceforge.stripes.exception.DefaultExceptionHandler (Log.java:90) - Unhandled exception caught by the Stripes default exception handler.<br>org.hibernate.AssertionFailure: cannot copy a reference to an object with a null id<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.type.EntityType.replace(EntityType.java:255)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.type.AbstractType.replace(AbstractType.java:153)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.type.TypeFactory.replaceAssociations(TypeFactory.java:564)<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:366)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:195)<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:123)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:677)<br>
&nbsp;&nbsp;&nbsp; at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:661)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:665)<br>&nbsp;&nbsp;&nbsp; at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:228)<br>
&nbsp;&nbsp;&nbsp; at com.tmdworldwide.projectmanager.persist.BaseDao.save(BaseDao.java:37)<br>&nbsp;&nbsp;&nbsp; at com.tmdworldwide.projectmanager.web.product.ProductActionBean.createProject(ProductActionBean.java:49)<br>&nbsp;&nbsp;&nbsp; at com.tmdworldwide.projectmanager.web.product.CreateTrifoldBrochureActionBean.createProject(CreateTrifoldBrochureActionBean.java:60)<br>
&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:597)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:442)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)<br>
&nbsp;&nbsp;&nbsp; at org.stripesstuff.plugin.security.SecurityInterceptor.interceptEventHandling(SecurityInterceptor.java:191)<br>&nbsp;&nbsp;&nbsp; at org.stripesstuff.plugin.security.SecurityInterceptor.intercept(SecurityInterceptor.java:123)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:440)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:285)<br>&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:167)<br>&nbsp;&nbsp;&nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)<br>
&nbsp;&nbsp;&nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
&nbsp;&nbsp;&nbsp; at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br>
&nbsp;&nbsp;&nbsp; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br>&nbsp;&nbsp;&nbsp; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)<br>
&nbsp;&nbsp;&nbsp; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)<br>&nbsp;&nbsp;&nbsp; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)<br>&nbsp;&nbsp;&nbsp; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)<br>
&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Thread.java:637)<br>