Using default
on non-saved attributes when parsing query results
#551
Labels
enhancement
New feature or request
good first issue
Good for newcomers
question
Further information is requested
Hello all,
I have the following issue:
I have an entity called CreatedAt, storing for specific types a CreatedAt record (for a specific sortkey lookup). One of my attributes is named
createdAt
, which is the timestamp stored within the ULID (stored within theid
field).I thought I could be smart (and saving a few bits of dynamodb space) by not storing the
createdAt
attribute, but to calculate it based on theid
like this:I was expecting that when I use the
CreatedAt.query( /* query details */ )
the parsed record would contain acreatedAt
attribute as well. Unfortunately, it does not. I was hoping it would fire thedefault
, but I guess because there is no CA attribute, it does not trigger this. Is there a way to resolve this issue?The text was updated successfully, but these errors were encountered: