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: mod-db-add: How to use ManualAutoIncrementModule?
Date Tue, 15 Jul 2003 13:21:11 GMT
On 10.Jul.2003 -- 03:56 PM, christian.ruess@daimlerchrysler.com wrote:
> Hi -
> 
> is there an example on how to use the modular database actions (esp. 
> mod-db-add) with 
> manual autoincrement. I use mysql, but do not want to acivate autoincrement for 
> the 
> database column. How can I configure the database descriptor file to use 
>    org.apache.cocoon.components.modules.database.ManualAutoIncrementModule

You can always specify the mode to use explicitly. 

Another way is to

       <map:action name="mod-db-add" src="org.apache.cocoon.acting.modular.DatabaseAddAction">
          <descriptor>database.xml</descriptor>
          <throw-exception>false</throw-exception>
          <autoincrement>auto</autoincrement>
       </map:action>

Specify the default mode for autoincrements. IIRC this currently
defaults to "manual" and not "auto" -> you could as well name the
manual autoincrement module to "manual" in cocoon.xconf and don't fuzz
with the default mode.

> In cocoon.xconf all autoincrement modules are named "auto" and according to 
> http://cocoon.apache.org/2.0/userdocs/concepts/modules.html
> this should not be changed.
> Could someone give me a hint based on the AutoIncrement sample included in the 
> cocoon2.1 
> distribution (requiring autoincrement activated for the table column in 
> database):
> <keys>
>          <key name="uid" type="int" autoincerement="true">
>            <mode name="auto" type="autoincr">

I'm not sure if the <mode..../> line above really works. I'm afraid
that there is a bug somewhere.... I will try to look into that but you
should be alright with the suggestions above.

	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

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


Mime
View raw message