TypeError: Cannot read properties of undefined (reading 'dbName') version `0.10.0`
See original GitHub issueTypeError: Cannot read properties of undefined (reading 'dbName')
schema
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
generator typegraphql {
provider = "typegraphql-prisma"
}
generator erd {
provider = "prisma-erd-generator"
}
model Message {
messageId Int @id @default(autoincrement()) @map("message_id")
sender String
content String
timestamp DateTime @default(now())
group Group @relation(fields: [groupId], references: [groupId], onDelete: Cascade)
groupId String
}
model Group {
groupId String @id @default(uuid()) @map("group_id")
name String?
messages Message[]
app App @relation(fields: [appId], references: [appId], onDelete: Cascade)
appId String
}
model App {
appId String @id @default(uuid()) @map("app_id")
name String @unique
messageCounter Int @default(0) @map("message_counter")
groups Group[]
}
dataModelString
{
"enums": [],
"models": [
{
"name": "Message",
"dbName": null,
"fields": [
{
"name": "messageId",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": true,
"isReadOnly": false,
"type": "Int",
"hasDefaultValue": true,
"default": {
"name": "autoincrement",
"args": []
},
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "sender",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "String",
"hasDefaultValue": false,
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "content",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "String",
"hasDefaultValue": false,
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "timestamp",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "DateTime",
"hasDefaultValue": true,
"default": {
"name": "now",
"args": []
},
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "group",
"kind": "object",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "Group",
"hasDefaultValue": false,
"relationName": "GroupToMessage",
"relationFromFields": [
"groupId"
],
"relationToFields": [
"groupId"
],
"relationOnDelete": "Cascade",
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "groupId",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": true,
"type": "String",
"hasDefaultValue": false,
"isGenerated": false,
"isUpdatedAt": false
}
],
"isGenerated": false,
"primaryKey": null,
"uniqueFields": [],
"uniqueIndexes": []
},
{
"name": "Group",
"dbName": null,
"fields": [
{
"name": "groupId",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": true,
"isReadOnly": false,
"type": "String",
"hasDefaultValue": true,
"default": {
"name": "uuid",
"args": []
},
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "name",
"kind": "scalar",
"isList": false,
"isRequired": false,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "String",
"hasDefaultValue": false,
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "messages",
"kind": "object",
"isList": true,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "Message",
"hasDefaultValue": false,
"relationName": "GroupToMessage",
"relationFromFields": [],
"relationToFields": [],
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "app",
"kind": "object",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "App",
"hasDefaultValue": false,
"relationName": "AppToGroup",
"relationFromFields": [
"appId"
],
"relationToFields": [
"appId"
],
"relationOnDelete": "Cascade",
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "appId",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": true,
"type": "String",
"hasDefaultValue": false,
"isGenerated": false,
"isUpdatedAt": false
}
],
"isGenerated": false,
"primaryKey": null,
"uniqueFields": [],
"uniqueIndexes": []
},
{
"name": "App",
"dbName": null,
"fields": [
{
"name": "appId",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": true,
"isReadOnly": false,
"type": "String",
"hasDefaultValue": true,
"default": {
"name": "uuid",
"args": []
},
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "name",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": true,
"isId": false,
"isReadOnly": false,
"type": "String",
"hasDefaultValue": false,
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "messageCounter",
"kind": "scalar",
"isList": false,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "Int",
"hasDefaultValue": true,
"default": 0.0,
"isGenerated": false,
"isUpdatedAt": false
},
{
"name": "groups",
"kind": "object",
"isList": true,
"isRequired": true,
"isUnique": false,
"isId": false,
"isReadOnly": false,
"type": "Group",
"hasDefaultValue": false,
"relationName": "AppToGroup",
"relationFromFields": [],
"relationToFields": [],
"isGenerated": false,
"isUpdatedAt": false
}
],
"isGenerated": false,
"primaryKey": null,
"uniqueFields": [],
"uniqueIndexes": []
}
]
}
mapped models
{mappedModels: [
{
name: 'Message',
dbName: null,
fields: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
isGenerated: false,
primaryKey: null,
uniqueFields: [],
uniqueIndexes: []
},
{
name: 'Group',
dbName: null,
fields: [ [Object], [Object], [Object], [Object], [Object] ],
isGenerated: false,
primaryKey: null,
uniqueFields: [],
uniqueIndexes: []
},
{
name: 'App',
dbName: null,
fields: [ [Object], [Object], [Object], [Object] ],
isGenerated: false,
primaryKey: null,
uniqueFields: [],
uniqueIndexes: []
}
]}
mentioned in #62
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'dbName' of null
I've tried to connect my Loopback application with MongoDb Atlas, but I'm having an error "TypeError: Cannot read property 'dbName' of null" ...
Read more >Not working for MongoDB · Issue #62 - GitHub
When using mongodb, the erd doesn't create any relationships. ... TypeError: Cannot read properties of undefined (reading 'dbName') version ...
Read more >TypeError: Cannot read properties of undefined ... - MongoDB
I have this code here: import { MongoClient } from "mongodb"; const createConnection = () => { // let current = null; const...
Read more >Find Answers to AWS Questions | AWS re:Post
Browse through and find similar questions to yours or answer questions from the community to become an expert on AWS re:Post.
Read more >Changelog - WatermelonDB documentation - GitHub Pages
Read -only records that cannot be saved in the database, updated, or deleted and only ... This is a big release to WatermelonDB...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@janpio I’m loving this debug output already 😎 Thank you
It ended up being an old prisma engine error. The older version I am/was using throws an error for
dml.types
not defaulted to an empty array. So it was pushing an undefined into themodellikes
. Will be shipped here soon in0.10.1