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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挕Efficiently load morphed relations #356

Open
rauanmayemir opened this issue Jul 18, 2022 · 1 comment
Open

馃挕Efficiently load morphed relations #356

rauanmayemir opened this issue Jul 18, 2022 · 1 comment
Assignees
Labels
type:feature New feature.

Comments

@rauanmayemir
Copy link
Contributor

I have an idea!

Say we have a media morphed relation of comment entity. (e.g media could be photo, video, embed, etc)

I would like to fetch comments and also be able to write:

$commentRepository
    ->select()
    ->load('media')
    ->fetchAll()

Here, cycle should first load all comments, then separately group and fetch morphed media_type from their corresponding tables and then merge them all back to the comments.

@roxblnfk
Copy link
Member

roxblnfk commented Aug 6, 2022

Try to use JTI instead of morphed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature.
Projects
Status: Backlog
Development

No branches or pull requests

2 participants