KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
We need to implement a write-once (on object create) read-only field with SQLAlchemy/Elixir. A quick-and-dirty solution: class User(Entity): # some fields ... _created = Field(DateTime, default=datetime.utcnow) @property def created(self): return self._created Is there a better approach (e.g., using before-insert triggers?)
Tags (comma-separated)
Save Edits
Cancel