sourcefuse / loopback4-starter

Loopback 4 starter application. Multi-tenant architecture supported. Authentication, Authorization, Soft deletes, environment vars, Audit logs, included.
MIT License
158 stars 59 forks source link

User Tenant Belongs To relations returning undefined #60

Closed Hairlock closed 3 years ago

Hairlock commented 4 years ago

I'm running into an issue when making use of the userTenantRepo's belongsTo functions. The role, user and tenant properties are returning undefined when called with the userTenant's id.

The following are rows in my user_tenants and roles table. The user is super_admin

image

image

The code for the user_tenant model and repository are unchanged, same with the role model and repo.

Any advice would be appreciated, thanks.

samarpan-b commented 3 years ago

Hi @Hairlock I hope you got your issue resolved. Can you please help others by explaining how was it resolved ?