Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing related entities on the extended client #20

Open
picasocro1 opened this issue Jun 27, 2023 · 2 comments
Open

Accessing related entities on the extended client #20

picasocro1 opened this issue Jun 27, 2023 · 2 comments

Comments

@picasocro1
Copy link

picasocro1 commented Jun 27, 2023

The extended client doesn't provide access to the related fields.

I modified this doc example's script.ts file to illustrate the problem:

image

image

The extended client (extension is empty) doesn't have the password property on the user model entity although it's present in the original (non-extended) one.

According to the schema, the password is a foreign entity relation:

image

@PiotrekPKP
Copy link

Same issue here!

@phil-loops
Copy link
Contributor

I don't have a good mental model for how this is working, but seeing two issues:

  1. password is a relation, so it needs to explicitly included or selected
  2. the query needs to be awaited before its data is accessible

Screen Shot 2023-07-19 at 1 57 10 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants