Support for GENERATED ALWAYS AS IDENTITY
columns
#30
Labels
documentation
Improvements or additions to documentation
GENERATED ALWAYS AS IDENTITY
columns
#30
As far as I know, it is generally considered best practice to enforce that the ID column will always be generated. The
GENERATED ALWAYS
modifier allows this. Additionally, theAS IDENTITY
modifier creates the numeric sequence.The documentation for deriving Table states that:
However, the implementation of the derive macro for the Insertable trait does not follow this:
ormx/ormx-macros/src/backend/postgres/insert.rs
Line 38 in bc65c51
ormx/ormx-macros/src/table/mod.rs
Lines 48 to 50 in bc65c51
I believe
insertable_fields
should also exclude the ID, or maybe the ID should be marked as having a default value by setting thedefault
field totrue
.The text was updated successfully, but these errors were encountered: