Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
83 stars 11 forks source link

Improve checking for unitialized values added to a Many #116

Closed Electron100 closed 1 year ago

Electron100 commented 1 year ago

This is a potential partial fix for #109 in that it reduces the risk of accidentally adding to a many an object with a primay key that isn't actually recorded in the database yet.

It does not provide an ideal solution in that it merely detects, rather than automatically saving.

Posting for comparison and discussion with #113

jayvdb commented 1 year ago

I expect https://github.com/Electron100/butane/pull/113 will be feature flagged when it is finished, so this PR is needed even if that PR is merged. We need this PR as the default. Also need the same for fkeys.

jayvdb commented 1 year ago

fwiw, I have nearly finished doing the same for fkey