QuestionQ17

Working with Databases and EAV

An Adobe Commerce developer is creating a module to manage custom brand entities and needs to reproduce the following SQL query with SearchCriteria:

Question Image

Which code snippet would generate the required SQL query?

  • A
  • B
  • C
Explanation

In Adobe Commerce SearchCriteria, filters within the same FilterGroup are joined with OR, while distinct FilterGroups are joined with AND. A group containing featured eq 1 and logo_image notnull, together with a separate group containing enabled eq 1, produces (featured = 1 OR logo_image IS NOT NULL) AND enabled = 1. The notnull condition type maps to an IS NOT NULL predicate.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!