HasManyThroughRepositoryFactory to provide resolver property.packages/repository-tests to verify that resolver works for real databases.(8-20-2020) Just to be clear, I have 2 tables (doctors, patients) and a many-many relationship between them using a hasManyThrough relationship, generated with the relation generator , does this mean that there is no way to get the relations between those 2 things via the controller? For instance, return doctors, and all their patients?
Thanks in advance!
Also sorry if this doesn't go here, just trying to understand what has been built yet!
@cardea-fletcher Yes. Currently only the relation is implemented, which means you can get the related models based on the foreign key. But getting parent models together with their related models is not supported yet as this is done by the inclusionResolver. As a workaround you need to send 2 queries.
When will this be published to npm ?
@ErwSim hi, check for it early next week.
Could you elaborate on how the workaround with 2 queries work ?
I need 3 queries and then have to traverse over every object to link them together. Is there a better way ?
@nabdelgadir Still not available ? :disappointed_relieved:
@ErwSim hi, sorry for the delay, but check again next week 馃 I'll post a comment here when it's available.
@nabdelgadir : do you have an idea when this will be available? :)
@ErwSim @SebastianDaehnrich there was just a new release, so it should be available now 馃槃
Yay, thanks @nabdelgadir
Most helpful comment
@cardea-fletcher Yes. Currently only the relation is implemented, which means you can get the related models based on the foreign key. But getting parent models together with their related models is not supported yet as this is done by the inclusionResolver. As a workaround you need to send 2 queries.