#33135 closed New feature (duplicate)
Add read_only parameter to Model fields for virtual columns.
Reported by: | Mohamed El-Kalioby | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
New DBMS provides virtual columns that are generated based on another column value in the row, these fields are read-only from DBMS prospective, so they shouldn’t be included in insert or update statements.
My suggestion is to add read-only flag to the BaseField class and if the flag is true, it shall be skipped from insert/update and can be selected as usual.
I can do it, if the community will accept it.
Change History (2)
comment:1 by , 3 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Version: | → dev |
comment:2 by , 3 years ago
Summary: | Read-only parameter for model fields → Add read_only parameter to Model fields for virtual columns. |
---|
Note:
See TracTickets
for help on using tickets.
Thanks for this ticket. Generated/Function-based virtual columns are a big topic. I don't think it's worth adding partial support and force users to maintain them manually.
Duplicate of #31300.