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

Clone ForeignKey val #244

Closed jayvdb closed 2 months ago

jayvdb commented 2 months ago

Many clone includes the values, so it is unexpected that ForeignKey doesn't behave the same way. This is more of a problem when cloning a DataObject which contains a ForeignKey, only to find that the val is missing and .get() needs to be called, which requires fetching from the database again.

Also often I find the custom Debug formatter of ForeignKey leaves me wondering if the .val has been fetched.