{"id":"5c66bdc6e9d6280a","repo":"drizzle-team/drizzle-orm","slug":"class-type-name-unknown-doesn-t-look-l","errorCode":null,"errorMessage":"Class \"${type.name ?? '<unknown>'}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.","messagePattern":"Class \"(.+?)\" doesn't look like a Drizzle entity\\. If this is incorrect and the class is provided by Drizzle, please report this as a bug\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-orm/src/entity.ts","lineNumber":22,"sourceCode":"export interface DrizzleEntity {\n\t[entityKind]: string;\n}\n\nexport type DrizzleEntityClass<T> =\n\t& ((abstract new(...args: any[]) => T) | (new(...args: any[]) => T))\n\t& DrizzleEntity;\n\nexport function is<T extends DrizzleEntityClass<any>>(value: any, type: T): value is InstanceType<T> {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\tif (value instanceof type) { // eslint-disable-line no-instanceof/no-instanceof\n\t\treturn true;\n\t}\n\n\tif (!Object.prototype.hasOwnProperty.call(type, entityKind)) {\n\t\tthrow new Error(\n\t\t\t`Class \"${\n\t\t\t\ttype.name ?? '<unknown>'\n\t\t\t}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`,\n\t\t);\n\t}\n\n\tlet cls = Object.getPrototypeOf(value).constructor;\n\tif (cls) {\n\t\t// Traverse the prototype chain to find the entityKind\n\t\twhile (cls) {\n\t\t\tif (entityKind in cls && cls[entityKind] === type[entityKind]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcls = Object.getPrototypeOf(cls);\n\t\t}\n\t}\n","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-orm/src/entity.ts#L4-L40","documentation":"Error \"Class \"${type.name ?? '<unknown>'}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.\" thrown in drizzle-team/drizzle-orm.","triggerScenarios":"Passing a class constructor to a Drizzle API (e.g. getTableConfig) that is not a Drizzle table/entity, or a class whose Drizzle symbols were lost via bundling or duplicate drizzle-orm copies.","commonSituations":"Multiple versions of drizzle-orm in node_modules; wrapping/extending Drizzle table classes; minifiers stripping static properties.","solutions":["Verify the object passed is a Drizzle table/schema class (e.g. created via pgTable/mysqlTable/sqliteTable), not a plain object or an unrelated class.","If the class is provided by Drizzle itself, report the issue on the drizzle-orm GitHub tracker."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b7862528fd8fc39bc2653a6c18dad7c1f4e68d10","analyzedAt":"2026-08-03T18:11:14.318Z","schemaVersion":2}