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

When entity find has pk and other conditions, only pk takes effect #606

Open
daiagou opened this issue Aug 1, 2023 · 0 comments
Open

When entity find has pk and other conditions, only pk takes effect #606

daiagou opened this issue Aug 1, 2023 · 0 comments

Comments

@daiagou
Copy link

daiagou commented Aug 1, 2023

For example, there is the following code:

ec.getEntity().find("moqui.service.message.SystemMessageRemote").condition("systemMessageRemoteId", "Default_JDVOP_PARAM")
        .condition("systemMessageTypeId", "Default_Unify_Hub_Activation").one();

Because systemMessageRemoteId is the primary key, systemMessageTypeId does not affect the query result no matter what content is passed, because only pk is used for the judgment condition.

Similarly, querying order information based on orderId, orderStatus, and so on. If I need to query orders based on orderId and orderStatus, now I can only use the order number to find the order information first, and then use the code to judge the order status.

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

No branches or pull requests

1 participant