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

Hi!

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

Another way is to create a special action (maybe an XSP-Action) to do the
work. For more info: http://wiki.cocoondev.org/Wiki.jsp?page=XSPAction

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">
  <keys>
    <key name="usr_id" type="long">
      <mode name="request-param" parameter="usr_id" type="request-param"/>
      <mode name="request-attr"
parameter="org.apache.cocoon.components.modules.output.OutputModule:auth_users.usr_id[0]"
       type="all"/>
    </key>
    <key name="rol_id" type="int" set="master">
      <mode name="request-param" parameter="rol_id" type="all"/>
    </key>
  </keys>
</table>

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





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

Reply via email to