You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database I am dealing with is really badly designed, and I would like to hide some of the atrocities in my models. Take the above example… is it possible to somehow make that model read the field{1…3} columns from the database, but not actually expose them on the model? Make them private somehow, and let me provide my own accessor?
I am aware that I can use Pydantic to hide these fields from __repr__ and the schemata, but I'd also like to hide them from the language server, such that field{1…3} are never offered to the coder as possible attributes of instances of the class?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
The database I am dealing with is really badly designed, and I would like to hide some of the atrocities in my models. Take the above example… is it possible to somehow make that model read the
field{1…3}columns from the database, but not actually expose them on the model? Make them private somehow, and let me provide my own accessor?I am aware that I can use Pydantic to hide these fields from
__repr__and the schemata, but I'd also like to hide them from the language server, such thatfield{1…3}are never offered to the coder as possible attributes of instances of the class?Operating System
Linux
Operating System Details
Debian unstable
SQLModel Version
0.0.27
Python Version
3.13.7
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions