Previous Topic

Next Topic

Allow Deletion of Self Referential Foreign Keys in c-treeACE SQL

It is possible to have a Foreign Key reference its own table. However, it was noted that with c-treeACE SQL, if a record is referenced by itself, it could not be deleted. Other SQL databases allow this action.

In this situation, the delete action was found to violate constraints, due to the order of constraint checking within the c-treeACE SQL engine, and c-treeACE SQL did not take into account it was referencing the same record.

The constraint check logic was adjusted such that the check is made after the actual deletion, avoiding the constraint violation.