Will, Sounds like you are committed to Hibernate at this point, but if not you might consider Cayenne. I don't have much personal experience with Cayenne, but overall I think it's easier to work with based on reported experiences.
Nevertheless, Hibernate has its strong points, and I've written several relatively complex Tapestry/Spring/Hibernate apps and have experienced everything you are running into. I had hoped originally that my Tapestry view layer could be free of worrying about the persistence layer, but I've found that Hibernate needs a little help when it comes to keeping the Hibernate session nice and clean. This often results in performing attach/merge/evict operations (as appropriate) in pageBeginRender and sometimes in my form listener method (I usually call it processForm()). The exceptions I typically run into with Hibernate are lazy initializations, non-unique objects, and dirty collections. To give a more specific answer to your problem at hand, it might be helpful if you would post your DirectLink method and your .page file. If for example your DirectLink method is using a persistent page property containing a child list of objects, you are probably needing to reattach your detached persistent object to the Hibernate session. Shawn Quoting Will Scheidegger <[EMAIL PROTECTED]>: > Sorry for the mass production of questions, but no matter which way > I'm > trying to work around my problems (see previous posts) I trip over > new > ones! > > Since I was not able to reliably change a locale with an ActionLink > (stale link exception, cleared out all page attributes etc.) I > decided > to give DirectLink and ExternalLink a try. I don't need a stateful > link > anyway, I would even prefer a stateless one! > > Unfortunately, now I'm getting a hibernate > LazyInitializatioException > > You might say now that this is not a Tapestry problem... and you're > probably right. The strange thing though is that I'm using the exact > > same DAO to get the data out of the DB that I've used before with > ActionLinks - needless to say that this worked perfectly with > ActionLinks. > > I guess it does not make much sense to simply ask "How do you do it?" > > because that's probably a bit vague, but I'm desperate... ;-) > > -Will > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
