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

SelectRelationActiveQuery relation attribute #331

Closed
nadar opened this issue Jul 2, 2019 · 0 comments
Closed

SelectRelationActiveQuery relation attribute #331

nadar opened this issue Jul 2, 2019 · 0 comments
Assignees

Comments

@nadar
Copy link
Member

nadar commented Jul 2, 2019

The SelectRelationActiveQuery plugin loads the data trough a fix defined where ID= condition, which is wrong and won't work with other primary keys.

Thefore a new attribute relation should be provided. This will also allow the eager loading of relation data in api calls:

public function prepareListQuery()
    {
        return parent::prepareListQuery()->with(['target']);
    }

otherwise this won't have any effect.

@nadar nadar self-assigned this Jul 2, 2019
@nadar nadar closed this as completed in 8f4b48e Jul 2, 2019
slowfox089 pushed a commit to slowfox089/luya-module-admin that referenced this issue Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant