cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malte Vahlenkamp" <>
Subject DatabaseAction
Date Wed, 06 Feb 2002 14:21:19 GMT
is there a way, to insert the data of an HTML-Form into more than one database table? I have
tried to do this via a database action (org.apache.cocoon.acting.DatabaseAddAction) and the
following mapping: 

  <parameter name="ProjectId" type="long" nullable="no"/>
  <parameter name="ProjectName" type="string" min-len="5" max-len="64"/>
  <parameter name="UserId" type="long" nullable="no"/>

  <table name="projects">
      		<key param="ProjectId" dbcol="projectid" type="int" mode="manual"/>
      <value param="ProjectName" dbcol="projectname" type="string"/>
      <value param="UserId" dbcol="userid" type="string"/>
   <table name="userprojects">	    	      		    
      		<key param="ProjectId" dbcol="projectid" type="int"/>
		<value param="UserId" dbcol="userid" type="int"/>

This mapping works fine for the first table, but tries to insert a ProjectId of NULL into
the second table. What I want is to insert the generated key of the first table instead.

Any ideas how to do this? 

Thanks for your time


Malte Vahlenkamp
Bruker Daltonik GmbH
Fahrenheitstr. 4
28359 Bremen, Germany
Phone: +49-421-2205-486

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

View raw message