Skip to content

Delete instance table when deleting the record in the main referring table #48

@biostatUniBS

Description

@biostatUniBS

Let's assume we have a main table called VISIT. Within VISIT I insert an INSTANCE TABLE called DRUGS: every VISIT (repeatable instrument) I can add 1 or more drugs that are repeating instances of the INSTANCE TABLE.

Eg: Visit 1 -> drugs: 1, 2, 3

Now, I can open the INSTANCE TABLE (pop-up) and edit, delete, add instances

Let's assume I want to delete the whole visit: I open the VISIT instrument and delete the instance. At the moment though the connected instances in the INSTANCE TABLE (DRUGS) are not deleted. So, if VISIT was instance number 1, the DB will still have instances in DRUGS referring to VISIT instance number 1, that was deleted. Once I enter a new VISIT instance, that would be 1 and it would have associated the residual INSTANCE TABLE. But that would be wrong.

So, a desired behaviour would be that once the main instrument instance referring to an iNSTANCE TABLE is deleted, the corresponding instances in the INSTANCE TABLE should be removed to.

Any hint

Stefano

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions