Closed vogloblinsky closed 6 months ago
Additional informations : same bug with TypeOrm, but fixed adding @Column around organizationId inside Person class entity.
Just checked this in a test project and it'd worked for me when I used organization
instead of organizationId
for joinKey
. Looks like @adminjs/prisma
uses relation fields instead of FKs to query relationships.
Additional informations : same bug with TypeOrm, but fixed adding @column around organizationId inside Person class entity.
Thanks a lot! It's definitely works!
Contact Details
No response
What happened?
I am trying to reproduce the example of the documentation : https://docs.adminjs.co/basics/features/relations
I have this prisma model :
and these two definitions for AdminJS :
When i open a detail page of an Organization, i have this error in the terminal (log output below)
Bug prevalence
Everytime
AdminJS dependencies version
"@adminjs/express": "^6.1.0", "@adminjs/nestjs": "^6.1.0", "@adminjs/prisma": "^5.0.1", "@adminjs/relations": "^1.0.0", "@nestjs/common": "^10.3.0", "@nestjs/config": "^3.1.1", "@nestjs/core": "^10.3.0", "@nestjs/platform-express": "^10.3.0", "@prisma/client": "^5.7.1", "adminjs": "^7.5.2", "express-formidable": "^1.2.0", "express-session": "^1.17.3", "pg": "latest", "reflect-metadata": "^0.2.1", "rxjs": "^7.8.1"
What browsers do you see the problem on?
Relevant log output
Relevant code that's giving you issues
In the
convertFilter
function, if i log thefilters
i got this :