Replies: 1 comment 3 replies
-
One more thing I discovered is that the query works on first call. When I then change the ExpertiseObject and do a put to the backend, after that all related objects come back with the query eventhough I am not asking it to output the related objects |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I encountered a problem with pinia which is really weird.
We have a Model: Expertise
{
id: this.uid(null),
appraiserId: this.uid(null),
appraiser: this.belongsTo(User, "appraiserId"),
}
Now when I query the expertise repository like so:
this.expertiseRepo.query().whereId('ID').first()
I would expect to get the following object back:
{
id: 'VERYLONGUID'
appraiserId: 'ID of the Appraiser'
}
But I am getting the following object back:
{
id: 'VERYLONGUID'
appraiserId: 'ID of the Appraiser'
appraiser: {
username: 'HANS@WURST.DE'
}
}
Why is appraiser object included even though I do not have a with or withAll or withAllRecursive in the query?
TIA
Beta Was this translation helpful? Give feedback.
All reactions