moqui/moqui-framework

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

daiagou opened this issue · 0 comments

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.