Any further thought on the above at all?
Reason I ask is because I still regularly get caught / frustrated with
situations similar to this, and am going to rock my own solution, with my
own branch of sqlalchemy.
If I get it to a "happy" and good enough state, I'd also be happy to PR it
back
Gah! That's it, make_transient_to_detached does everything as you said.
I do truly only need "simple" loading on my objects, anything that has a
many-to-many relationship (they're in 3 separate areas), which would
require a separate dB call normally, I just set those manually.
Thanks Mike.
On Sun, Sep 30, 2018 at 9:39 AM seaders wrote:
>
> Well, here's my solution that works exactly the way I want it,
>
> @classmethod
> def from_flat_json(cls, d=None, db_enable_relationship_loading=True,
>**kwargs):
> # noinspection PyArgumentList
> new_instance =
Well, here's my solution that works exactly the way I want it,
@classmethod
def from_flat_json(cls, d=None, db_enable_relationship_loading=True,
**kwargs):
# noinspection PyArgumentList
new_instance = cls(**d, **kwargs)
state = instance_state(new_instance)