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
model Example {
someId Int @default(dbgenerated("(current_setting('app.clinic_id'::text)::integer)"))
generates into fake-data.ts:
someId: [object Object]
which errors out:
fake-data.ts:210:16 - error TS2552: Cannot find name 'object'. Did you mean 'Object'?
210 someId: [object Object],
~~~~~~
node_modules/typescript/lib/lib.es5.d.ts:270:13
270 declare var Object: ObjectConstructor;
~~~~~~
'Object' is declared here.
Adding @db.Integer to the prisma schema line has no effect.
I also see an example of a String attribute with @dbgenerated that generates:
someId: '[object Object']
which does not error but is not helpful.
I think the issue is in createMethod.js:37 and :40, where $field.default is returning [object Object]. No handling for dbgenerated inside default?
Thanks
The text was updated successfully, but these errors were encountered:
I guess it's closely related to #17 and #12. For unsupported types or values, it'd be great to allow the developer to override the default behaviour and just add FAKE: whatever_you_want_here()
generates into fake-data.ts:
which errors out:
Adding @db.Integer to the prisma schema line has no effect.
I also see an example of a String attribute with @dbgenerated that generates:
which does not error but is not helpful.
I think the issue is in createMethod.js:37 and :40, where $field.default is returning [object Object]. No handling for dbgenerated inside default?
Thanks
The text was updated successfully, but these errors were encountered: