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

PHP notices and warnings while making complex PHQL queries #1222

Closed
endeveit opened this issue Sep 12, 2013 · 3 comments
Closed

PHP notices and warnings while making complex PHQL queries #1222

endeveit opened this issue Sep 12, 2013 · 3 comments

Comments

@endeveit
Copy link
Contributor

// Make the complex query
$rs = $di->get('modelsManager')
    ->createBuilder()
    ->columns('*')
    ->from('Acme\Model\AclRole')
    ->join('Acme\Model\AclResource', 'ar.role_id = Acme\Model\AclRole.id', 'ar')
    ->join('Acme\Model\AclAction', 'aa.resource_id = ar.id', 'aa')
    ->getQuery()
    ->execute();

// Start working with \Phalcon\Mvc\Model\Row
print_r($rs->toArray()); // Here we got notice and warning in server logs
PHP Notice:  Undefined index: balias in /var/www/src/Acme/Model/AclRole.php on line 185
PHP Warning:  Phalcon\Mvc\Model\Resultset\Complex::valid(): Property should be string in /var/www/src/Acme/Model/AclRole.php on line 185
@endeveit
Copy link
Contributor Author

The notices and warnings are produced only when called method «->columns('*')»

@dreamsxin
Copy link
Contributor

Could your please submit test to reproduce the Warning?

PHP Warning:  Phalcon\Mvc\Model\Resultset\Complex::valid(): Property should be string in /var/www/src/Acme/Model/AclRole.php on line 185

this warning not found.

@endeveit
Copy link
Contributor Author

Cannot reproduce now.
Thanks

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

No branches or pull requests

2 participants