This is something I need to check on to see what prom does, say I do something like this:
f = Foo(pk="<UUID>", bar="some value")
await f.save()
What does that do if there is already a row with a matching pk? Let's say Foo had 6 fields, does it blow those out with None or default values?
I think it should look at the primary key field and decide if it is a key that can be set, if it isn't it (ie it's an auto-set UUID or counting field) then it should treat the pk as belonging to an existing row and set the appropriate plumbing to do an update when .save() is called.
This is something I need to check on to see what prom does, say I do something like this:
What does that do if there is already a row with a matching pk? Let's say
Foo
had 6 fields, does it blow those out with None or default values?I think it should look at the primary key field and decide if it is a key that can be set, if it isn't it (ie it's an auto-set UUID or counting field) then it should treat the pk as belonging to an existing row and set the appropriate plumbing to do an update when
.save()
is called.