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

ngRest SelectModel #177

Closed
luya-bot opened this issue Jul 10, 2018 · 1 comment
Closed

ngRest SelectModel #177

luya-bot opened this issue Jul 10, 2018 · 1 comment
Assignees
Labels

Comments

@luya-bot
Copy link

This issue has originally been reported by @cringasuionut at luyadev/luya#1833.
Moved here by @nadar.


What steps will reproduce the problem?

I have a ngRestModel (ex. Activity) with 2 attributes (ex. "type_id" and "category_id") related with another ngRestModel (ex. DictionaryDetail), both fields referencing on DictionaryDetail ID field. In Activity model I have the ngRestAttributeTypes method within I have two different "where" pointing to same DictionaryDetail model. The second "where" doesn't apply, only the first one.

What is the expected result?

In type_id I expect to see DictionaryDetail rows filtered by the "where" clause.
In category_id I expect to see DictionaryDetail rows filtered by the "where" clause.

What do you get instead? (A Screenshot can help us a lot!)

In both fields ("type_id" and "category_id") I see the results from the first "where".
image

LUYA Check ouput (run this script and post the result: luyacheck.php)

Additional infos

This method causes the problem:

https://github.com/luyadev/luya-module-admin/blob/master/src/ngrest/plugins/SelectModel.php#L112

Q A
LUYA Version
PHP Version
Platform Apache/XAMPP/MAMPP/etc.
Operating system Windows/Linux Server/OSX/etc.
@nadar
Copy link
Member

nadar commented Jul 10, 2018

@cringasuionut i just pushed a fix, could you please try?

@nadar nadar removed the pkg:admin label Jul 14, 2018
@nadar nadar closed this as completed Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants