Closed nicoulaj closed 1 month ago
Hey, thanks for the PR.
#[ormx(default)]
was intended to be used for columns with a default value.
For supporting generated columns, I suggest we introduce an other PG-specific attribute, maybe #[ormx(generated)]
, which would have the effect you implemented here for #[ormx(default)]
.
Is it really PG specific though ? Mysql also has generated columns.
thats possible, never worked with it though. But as I said, we need to differentiate between default and generated.
@nicoulaj Are you still willing to persue this? I think support for #[ormx(generated)]
would be super cool.
This fixes a bug where
update()
does not exclude generated columns annotated withdefault
attribute, leading to compilation errors when using#[derive(ormx::Table)]
with postgres: