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: Cocoon - DatabaseAddAction
Date Mon, 22 Jul 2002 07:27:06 GMT
On 21.Jul.2002 -- 10:03 AM, Illia Auringer wrote:
> I have found a message from you in the Cocoon Mailing List where you
> put a solution how to accsess a manually generated key of a new
> table entry to insert it in a second table. I tried it like you said
> but it doesn´t work. Here is my problem: I got two tables (postings
> and thread_postings) and on inserting new records an id for
> "postings" is generated with the manual-mode. Now I would like to
> insert that id in the second table "thread_postings". I tried that
> with the following descriptor:
> 
>   <connection>discussionBoard</connection>
>   <table name="postings">
>     <keys>
>       <key param="Id" dbcol="Id" type="int" mode="manual"/>
>     </keys>
>     <values>
>       <value param="text_posting" dbcol="Text" type="string"/>
>     </values>
>   </table>
>   <table name="thread_postings">
>     <values>
>       <!-- here is where the parameter is not found! -->
>       <key param="key:postings:Id" dbcol="Id_Posting" type="int" mode="request-attribute"/>

>       <value param="id" dbcol="Id_Thread" type="int"/>
>     </values>
>   </table>
> 
> Where can the problem be?

I don't know off hand the exact mechanics. The original
Database*Actions use inconsistent prefixing. It is documented in the
2.0.3 docs.

A *big* problem with your descriptor file is that you have a *key* in
a *values* section. Thus it will be ignored. You may need to prefix
the @param with "org.apache.cocoon.acting.AbstractDatabaseAction:"

> I´m using Cocoon 2.0.2, Tomcat 3.3.1 and JRE 1.3.1 on WinXP

Please consider using the DatabaseActions from the modular
package. They are available with the 2.1 snapshots and for 2.0.3 in
the scratchpad area.

	Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

-- 
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