On Apr 5, 2004, at 11:31 AM, Hugo Burm wrote:
I have been thinking about a Hibernate block on cocoondev.org.
That would be great!
I've been working on getting your Hibernate+Woody sample working for:
• Cocoon 2.1.5_dev
• Hibernate 2.0, w/ minimal changes to hibernate.properties (just the dialect & credentials for MySQL)
• MySQL 4.0
I left it in 'woody' as I had no particular need to make the sample work in 'CForms'. Only minor changes were needed, I think just to the form definition (added <wd:datatype base-"string"> to a couple of widgets).
Here is the exact set of jars from the Hibernate2 distro that need to be copied for this sample to work:
hibernate2.jar odmg-3.0.jar dom4j-1.4.jar cglib-2.0-rc2.jar jta.jar ehcache-0.6.jar mysql-connector-java-3.0.8-stable-bin.jar
Here's where I'm stuck now: the form.load() crapped out saying it expected a java.lang.Long and got a java.lang.Integer instead. So I changed the datatype from "long" to "integer" in the form definition, and behold — the first load() worked, I ran through the sample, and the save() worked, too. But when I tried the sample again, the load() barfed again, saying that now it wants an Integer and is getting a Long instead!
Any ideas? I'm the rankest of noobs to Hibernate, so kind of scratching my head right now...
Thanks for any help, mark