We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca2e58b commit 0f2ebecCopy full SHA for 0f2ebec
index.d.ts
@@ -126,6 +126,8 @@ declare module "@moleculer/database" {
126
permission?: string | string[];
127
/** Read permission required for this field */
128
readPermission?: string | string[];
129
+ /** Virtual field (not stored in DB) */
130
+ virtual?: boolean;
131
/** Population configuration */
132
populate?:
133
| PopulateDefinition
test/typescript/index.ts
@@ -272,6 +272,11 @@ const postFields: Fields = {
272
max: 20,
273
default: []
274
},
275
+ virtual: {
276
+ type: "string",
277
+ virtual: true,
278
+ get: (value: any, entity: any) => "virtual"
279
+ },
280
metadata: complexObjectField,
281
createdAt: {
282
type: "number",
0 commit comments