-
I have these entities:
In my PostRepositoryClass I want to have function that returns post by id with its comments and response schema like this :
it returns:
it returns:
it returns error in query: How do I should write this code? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 18 replies
-
QB does not return a JSON as you are saying, it returns entity instances (at least when execute it this way with It's hard to tell more, ideally provide a complete reproduction. Also, next time please be patient, if you open a GH discussion, and do not get a response in 30 minutes, it does not mean you need to create yet another issue about the very same, without any additional context. |
Beta Was this translation helpful? Give feedback.
Few notes:
persist: false
on collection properties, they are virtual by definitionCollection
wrapper for them$and
operator in join condition, just a plain object condition is enough - using$and/$or
with a single item in the array makes no sense in generalqb.joinAndSelect
for hydration to work, you need the metadata which are otherwise not there, you need the al…