cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corin Moss <>
Subject Cforms - binding a one-to-many relationship with hibernate
Date Wed, 30 Mar 2005 00:17:30 GMT
Hi there,

I'm looking at the Hibernate / CForms combination for the first time.  
I've successfully bound forms to beans to Hibernate for fairly simple 
cases (modifying a flat record for example.)  I now have a slightly more 
complicated example:

-A record exists in table "programme" with a one-to-many relationship 
with table "keyword_relationship" (based on programme's programme_id)
-"keyword_relationship" has a many-to-one relationship with table 
"keywords" (based on keyword's keyword_id)

I would like to creating a binding so that a new bean can be inserted 
representing a "keyword_relationship" record, but from the "programme" 
bean context.  Obviously the "keyword" bean would exist already, as 
would the "programme" bean.

I've got no problems traversing the graph so that I can display (and 
persist) "keyword" records as related to specific "programme" records - 
it's purely creating new "keyword_relationship" records that is proving 

Can anyone direct me to any example of this happening? I've looked 
through the super-sonic tour block, but haven't been able to unearth 
anything.  I've attached my Hibernate binding files for reference 
(generated using Hibernate Synchronizer in Eclipse.)

Thanks for your help,


View raw message