moqui / moqui-framework

Use Moqui Framework to build enterprise applications based on Java. It includes tools for databases (relational, graph, document), local and web services, web and other UI with screens and forms, security, file/resource access, scripts, templates, l10n, caching, logging, search, rules, workflow, multi-instance, and integration.
http://www.moqui.org
Other
279 stars 199 forks source link

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

Open daiagou opened 1 year ago

daiagou commented 1 year ago

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.