Open mbise1993 opened 1 year ago
This might work if you define a @Property
for notificationPreferencesId
My relation is going the other way actually, there's a userId
column on NotificationPreferences
, but no notificationPreferencesId
column on User
. I did try defining a @Property
for userId
, but no luck
Description I have a couple of entities defined which have a 1:1 relation:
When I navigate to the "User" resource in AdminJS and select a user, the "Notification Preferences" field is blank. However, if I navigate to the "Notification Preferences" resource, I can see the linked user. After some experimenting, I've found that I can get it to work by removing the
eager: true
option from thenotificationPreferences
reference on theUser
entity.Installed libraries "@adminjs/express": "^5.0.1", "@adminjs/mikroorm": "^2.0.0", "@adminjs/nestjs": "^5.1.0", "@mikro-orm/core": "^5.6.0", "@mikro-orm/nestjs": "^5.1.2", "@mikro-orm/postgresql": "^5.6.0",
Additional details Here is the JSON response from the request to
/admin/api/resources/User/records/1/show
with theeager: true
option set:And without the
eager: true
option set (this works):