cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: [c2] patch for database actions
Date Thu, 17 May 2001 20:11:57 GMT
Donald Ball wrote:
> attached is a patch for the database actions to allow the database add
> action to add multiple rows to multiple tables from one form of values. a
> sample form descriptor is:
> <map>
>   <connection>test</connection>
>   <table name="product_table">
>     <keys>
>       <key param="id" dbcol="id" type="int" mode="form"/>
>     </keys>
>     <values>
>       <value param="name" dbcol="name" type="string"/>
>     </values>
>   </table>
>   <table name="product_meta_element_table">
>     <keys>
>       <key param="id" dbcol="product_id" type="int" mode="form"/>
>       <key param="product_meta_element_name_*_param" dbcol="name" type="string" mode="form"/>
>     </keys>
>     <values>
>       <value param="product_meta_element_value_*_param" dbcol="value" type="string"/>
>     </values>
>   </table>
> </map:
> note that all of a table's keys must be mode="form" if you're adding many
> rows to the same table, or if the same new key value is used in multiple
> tables. i'm gonna be fixing that. anyway, it's a pretty sizable patch so i
> thought i'd flip it out for y'all to peruse before i committed it. if
> berin doesn't want this added to the main action set i'm happy to commit
> it as a new action.

If you can still map a single table and form, we're good.  My whole approach
with the DatabaseActions was to spur people's imaginations and to get something
that worked--quickly.

It is more flexible.

To unsubscribe, e-mail:
For additional commands, email:

View raw message