Hi,

updating & adding works OK. But when trying to do delete action, it seems to delete tables in wrong order happens: referential integrity violation in postgresql.

I have 3 tables in postgresql:

create table foo (
 id serial,
 name varchar(20),
primary key(id));

create table bar (
 id serial,
 foo_id integer,
 name varchar(20),
primary key (id),
foreign key (foo_id) references foo(id));

create table baz (
 id serial,
 foo_id integer,
 name varchar(20),
primary key (id),
foreign key (foo_id) references foo(id));


database.xml (for modulardatabase actions):

 <table name="foo" alias="foo">
  <keys>
   <key name="id" type="int" autoincrement="true" set="master">
    <mode name="auto"  type="autoincr"/>
   </key>
  </keys>
  <values>
   <value name="name" type="string"></value>
  </values>
 </table>

<table name="bar" alias="bar">
<keys>
<key name="bar_id" type="int">
<mode name="request-param" type="request-param" parameter="products.id">
<parameter>products.id</parameter>
</mode>
<mode name="request-attr" type="attrib">
<parameter>org.apache.cocoon.components.modules.output.OutputModule: foo.id[0]</parameter>
</mode>
</key>
</keys>
<values>
<value name="name" type="string"></value>
</values>
</table>


for table baz the layout is same as in bar.

It tries first to remove foo and happens reference violation. So, how to make it remove the "childs" first and then the "master" table?

Thanks,

Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *


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



Reply via email to