behairy
|
December 27, 2016 at 3:42 pm
Hello,
I have two custom meta keys (type & genre). I’m using EE4 model querying
to filter events, but only one is being used and the other is ignored. After inspecting the SQL generated, it seems that EE_Base does not automatically generate a SELF-JOIN, which how such case should be handled. Is there any native way of doing this in EE4?
$events = EEM_Event::instance()->get_all(array(
array(
‘AND’ => array(
‘Post_Meta.meta_value*a’=>’genre’,
‘Post_Meta.meta_value*b’=>’genre1’,
),
‘AND’ => array(
‘Post_Meta.meta_key*c’=>’type’,
‘Post_Meta.meta_value*d’=>’type1’,
)
)));
|