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

search not working when using alias and multiple models #17

Closed
stefanchiriac opened this issue Dec 1, 2015 · 3 comments · May be fixed by #26
Closed

search not working when using alias and multiple models #17

stefanchiriac opened this issue Dec 1, 2015 · 3 comments · May be fixed by #26

Comments

@stefanchiriac
Copy link

Hello,

When using builder and relationships between 2 models, column search and global search no longer works and returns all results.

The problem seems to be from QueryBuilder::getResponse on $this->bind()

      $builder = $this->modelsManager->createBuilder()
        ->columns('u.id, u.username, u.email, r.name, u.status')
        ->addFrom('Core\Models\User', 'u')
        ->addFrom('Core\Models\Role', 'r')
        ->where('u.role_id = r.id');

Thanks

@kaanc
Copy link

kaanc commented Dec 6, 2015

yes because query builder where working only first draw. after its not work. I open also this issues.

@stefanchiriac
Copy link
Author

this is fixed in my pull request, but seems like no one is maintaining this repo anymore. Is available on my fork https://github.com/magnxpyr/phalcon-datatables

@nathanhollows
Copy link

This is fantastic! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants