----- Original Message -----
Sent: Sunday, March 20, 2005 9:46
PM
Subject: a one2many binding with
hibernate
Hi:
I want to write a one2many binding,the O/R MAP and java
code were generated by hibernatesync,
it had two kind of beans for parent
table,Bean,DAO
and it had three kind of beans child
table,Bean,DAO,PK
The Biding collection is below
<fb:repeater id="shclj2List" parent-path="."
row-path="shclj2Set">
<fb:on-bind>
<fb:value
id="shclj2_csdh" path="id/shclj2Csdh"/>
<fb:value
id="shclj2_csjc" path="shclj2Csjc"/>
<fb:value
id="shclj2_cspm" path="shclj2Cspm"/>
<fb:value
id="shclj2_coin" path="shclj2Coin"/>
<fb:value
id="shclj2_price" path="shclj2Price"/>
<fb:value
id="shclj2_cgl"
path="shclj2Cgl"/>
</fb:on-bind>
<fb:on-delete-row>
<fb:delete-node/>
</fb:on-delete-row>
<fb:on-insert-row>
<fb:insert-bean
classname="com.goodwillheater.Shclj2"
addmethod="addToShclj2Set"/>
</fb:on-insert-row>
</fb:repeater>
When Load It's ok,But When save
org.apache.avalon.framework.CascadingRuntimeException: InsertBean
failed
If I don't use a PK class,the same error
appear.
If I add a
<fb:identity>
<fb:value
id="id"
path="@id/shclj2Csdh"/>
</fb:identity>
the error happend
java.lang.RuntimeException: Tried to set value of output
widget "shclj2List.0.id" with an object of an incorrect type: expected class
java.lang.Long, received class java.lang.String
I do not write a hibernate session component in
cocoon.xconf like the sample said.
Best Regards
Johnson