Custom non-persisted field in generated classes #1020
PaulVipond
started this conversation in
General
Replies: 1 comment 1 reply
-
No, this is not possible by design. Generated row classes should only hold one row from the table. What you could do is define an extension on the generated class and add the property with an expando: Expando<bool> _isFromAppUserExp = Expando();
extension on ContentMessage {
bool get isFromAppUser => _isFromAppUserExp[this];
set isFromAppUser(bool value) => _isFromAppUserExp[this] = value;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I've done a fair amount of googling, but still not sure if it's possible. Is it possible to add a non-persisted field to the generated classes which return table content? Something like this would be great.
I realise I could transform this into another object, but it's a fairly simple case for one extra column.
Beta Was this translation helpful? Give feedback.
All reactions