Skip to content

SaveAll() function Deletes Related Records unexpectedly. #70

@IvandaNothabeer

Description

@IvandaNothabeer

The Saveall() function will delete related records if those relations were not completely found by LoadAll() or were not fully presented on the CRUD view.

Example ....

  • "Owner" -has many- "Cars" -has many- "Parts"
  • CRUD form has sub forms for "Cars" and "Parts"

If there are several hundred "parts" for one "car" and several "cars" for each "owner", then the list of "Parts" records on the CRUD can run into hundreds or thousands of records. The List of "Parts" on the CRUD view can / will be incomplete.

If a new "car" is added or the "owner" record is then saved, the missing "parts" records from the CRUD view will be deleted from the database.

In an extreme case, if you LoadAll(), including "Parts" , but do not display the "Parts" records in the CRUD view, then SaveAll() will delete EVERY "parts" record.

This is probably the same problem that occured in this bug report #67

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