Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveAll() function Deletes Related Records unexpectedly. #70

Open
IvandaNothabeer opened this issue Jan 16, 2023 · 1 comment
Open

SaveAll() function Deletes Related Records unexpectedly. #70

IvandaNothabeer opened this issue Jan 16, 2023 · 1 comment

Comments

@IvandaNothabeer
Copy link

IvandaNothabeer commented Jan 16, 2023

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

@IvandaNothabeer
Copy link
Author

#54
Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant