cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: How to insert multiple rows in a table at once?
Date Wed, 16 Oct 2002 07:50:36 GMT
On 15.Oct.2002 -- 08:05 PM, Tuomo Lesonen wrote:
> In your sitemap inside <map:actions> put:
> 
> <map:action name="mod-db-add" src="org.apache.cocoon.acting.modular.DatabaseAddAction">
>   <descriptor>context://foo/bar/database.xml</descriptor>
>   <throw-exception>true</throw-exception>
> </map:action>
> 
> In pipeline:
> 
> <map:act type="mod-db-add">
>   <map:parameter name="table-set" value="some_table_set" />
> </map:act>
> 
> In database.xml put:
> 
> <table name="foo">
>   <keys>
>     <key name="my_sub_id" type="int" autoincrement="true" primarykey="true">

@primarykey is not known to the DatabaseActions. It does no harm
either.

The @set stuff is explained in the Cocoon docs. The "mod-db" example
uses it as well.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message