Hi there,
I have two tables: A and B. Table B holds children from A, connected 1:n.
Now, I want to delete three entries in Table B giving the id in parent Table A using this SQL: delete from table_B where fk_id = table_A.pk;
Now I created two DataSources: TableA and TableB.
I want to place in the first DataSource xml file (table A) an operationBinding
to erase the children in table B at the same time.
And here is my question: how can I do it?
Iīve reading the whole Api, but I just donīt get it!
My try:
...
<operationBindings>
<operationBinding operationType="remove" operationId="deleteChildren">
<criteria fieldName="id" value="$mainID"/>
HERE THE SQL, somehow!!!
</operationBinding>
</operationBindings>
...
Please can you give me an example, how can I delete,
within the same operationBinding, values in different tables.
Thanks a lot.
I have two tables: A and B. Table B holds children from A, connected 1:n.
Now, I want to delete three entries in Table B giving the id in parent Table A using this SQL: delete from table_B where fk_id = table_A.pk;
Now I created two DataSources: TableA and TableB.
I want to place in the first DataSource xml file (table A) an operationBinding
to erase the children in table B at the same time.
And here is my question: how can I do it?
Iīve reading the whole Api, but I just donīt get it!
My try:
...
<operationBindings>
<operationBinding operationType="remove" operationId="deleteChildren">
<criteria fieldName="id" value="$mainID"/>
HERE THE SQL, somehow!!!
</operationBinding>
</operationBindings>
...
Please can you give me an example, how can I delete,
within the same operationBinding, values in different tables.
Thanks a lot.
Comment