We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a562d0a commit 92c6d2aCopy full SHA for 92c6d2a
lib/enum.ts
@@ -97,15 +97,16 @@ export const createEnumImplementer = <
97
let enumValues: any[] | undefined;
98
99
if (tsName) {
100
- const schemaEnum = db._.schema![tsName as string];
+ const schemaEnum = db._.fullSchema![tsName as string];
101
102
enumSchemaName = tsName.toString();
103
104
const enumCol = Object.values(db._.schema!)
105
.filter((s) => typeof s === "object")
106
.map((s) => Object.values(s.columns))
107
.flat(2)
108
- .find((s: any) => s.config?.enum === schemaEnum);
+ .filter(isEnumSchema)
109
+ .find((e: any) => e.config.enum === schemaEnum);
110
111
if (!enumCol) {
112
throw new RumbleError(`Could not find applied enum column for ${tsName.toString()}.
0 commit comments