cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <>
Subject Re: mod-db - Updating multiple rows
Date Sun, 08 Jun 2003 15:52:27 GMT
Christian Haul dijo:
> One thing is impossible, though: update may not affect key columns. This
>  has been requested by Antonio but he didn't come up with a patch so far
> ;-)


I dont made the patch since it is posible to create and alias of the table
and change the key values. I know this is a hack, but it works. :)

Intentionally, change the "changing keys" to a "value" attribute. That is
all. It works. for us. Of course you need to use set="master" where you

Another way is to create a special action (maybe an XSP-Action) to do the
work. For more info:

Best Regards,

Antonio Gallardo.

For example to delete all the records from a table we did it. Please note
we define the alias just with the fields we are interested in. If a field
is not interesting in a given action just dont write it. The same apply to
the keys.

table name="auth_users_roles">
    <key name="usr_id" type="long">
      <mode name="request-param" parameter="usr_id" type="request-param"/>
      <mode name="request-attr"
    <key name="rol_id" type="int" set="master">
      <mode name="request-param" parameter="rol_id" type="all"/>

<!-- Alias of the table just with ONE key to allow delete -->
<table name="auth_users_roles" alias="auth_users_roles_borrar">
    <key name="usr_id" type="long">
      <mode name="request-param" parameter="usr_id" type="all"/>

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

View raw message