When trying to use many to many with a model that has a optional reference, the entries without a reference cause Prisma to throw a error because it expects nulled or undefined values to be filtered out when calling prisma.[KEY].findMany()
Bug prevalence
When trying to view a list from the relation owner and at least one entry in the junction model contains a null or undefined reference.
@ZanderFoster could you try with @adminjs/relations @ 1.1.1? The ids provided to findMany are now filtered to exclude undefined and null values if such exist in the list.
Contact Details
No response
What happened?
When trying to use many to many with a model that has a optional reference, the entries without a reference cause Prisma to throw a error because it expects nulled or undefined values to be filtered out when calling prisma.[KEY].findMany()
Bug prevalence
When trying to view a list from the relation owner and at least one entry in the junction model contains a null or undefined reference.
AdminJS dependencies version
"dependencies": { "@adminjs/express": "^6.1.0", "@adminjs/logger": "^5.0.1", "@adminjs/passwords": "^4.0.0", "@adminjs/prisma": "^5.0.2", "@adminjs/relations": "^1.0.1", "@adminjs/themes": "^1.0.1", "@adminjs/upload": "^4.0.2", "@prisma/client": "^5.6.0", "adminjs": "^7.4.1", },
What browsers do you see the problem on?
No response
Relevant log output
Relevant code that's giving you issues