I forget to tell you that I'm using mysql.

I think the problem is with transactions: the mmbase db tables do not use innodb, thus mmbase is not using mysql transactions and the state of the db remains unchanged until all operations are commited.

Now, if the mmbase core perform a sql query for getting relations (and, looking at the code, this seems to be true) it is impossible to delete nodes and relations togheder without getting the "cannot be deleted. It still has relations attached to it" exception.

Am I wrong? Is this a bug? Please help!

If my problem is not clear, because of a bad explanation, please ask me clarification questions.

Marco Ciancimino wrote:

Hi,
I have two related builders: resources and metadata. I have some trouble deleting the nodes.


If I try:

metadata.delete(true);
resource.delete();

the following error occours:
org.mmbase.bridge.BridgeException: This node (239) cannot be deleted. It still has relations attached to it.


If I try:

metadata.delete(true);
resource.delete(true);

the following error occours:
org.mmbase.bridge.BridgeException: node not added as it was already in the transaction


Am I missed something? What is the right way for deleting related nodes?

Thanks in advance,
Marco










Reply via email to