Hello,

I use a postgresql DB, and would like to insert field thanks to
databaseAddAction but I have such an horrible error message when I try
to process.

Here is my database :
 
             Table �public.document�
     Colonne      |      Type       | Modificateurs
------------------+-----------------+---------------
 doc_id           | integer         | not null default
nextval('public.document_doc_id_seq'::text)
 doc_title        | character(1024) |

Index :
    �document_pkey� primary key, btree (doc_id)

   **************************************
In my cocoon.xconf: 
...
<component-instance logger="core.modules.auto" name="psql-auto"
class="org.apache.cocoon.components.modules.database.PgsqlAutoIncrementModule"/>
...

   **************************************

My sitemap :
 ...
<map:action name="mod-db-add"
src="org.apache.cocoon.acting.modular.DatabaseAddAction">
          <descriptor>database_pfe.xml</descriptor>
          <throw-exception>true</throw-exception>
          <autoincrement>psql-auto</autoincrement>
 </map:action>
 ... 

<map:act type="mod-db-add">
   <map:parameter name="document.doc_id"    value="12"/> <!-- another
piece of test -->
   <map:parameter name="document.doc_title" value="thisIsATest"/>
   ...
</map:act>
..

   **************************************

my descriptor : 

<root>
   <parameter name="document.doc_id" type="int" nullable="no" />
   <constraint-set name="add">
       <validate name="document.doc_id"/>
   </constraint-set>
   <connection>public-users</connection>
   
   <table name="document">
   <keys>
          <key name="doc_id" type="int" autoincrement="true">
            <mode name="psql-auto" type="autoincr"/>
         </key>
   </keys>
      <values>
         <value name="doc_title"         type="string"/>
      </values>   
   </table>
</root>

   **************************************

It took me two days before resigning myself to wrote this email, could
be great to be solved the way I could start sleeping :)

Thanks in advance,
Stephane


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to