in generateCallHopperModular this dql block: ( ( ( ( Media_Tracking_fkSubscriptiontrackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id_fk_CallCenterGroup_id_fk_CallCenterGroupCallCenter_callcentergroupid_fk_CallCenter_id_fk_Device_callcenterid.id IS NULL ) ) ) ) OR ( ( (SELECT COUNT( _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.id ) as COUNT_group FROM Media_Offer _Media_Offer1376762798 LEFT JOIN _Media_Offer1376762798.fk_OfferSkill_offerid _Media_Offer_fk_OfferSkill_offerid1376762798 LEFT JOIN _Media_Offer_fk_OfferSkill_offerid1376762798.fkSkillid _Media_Offer_fk_OfferSkill_offerid_fkSkillid1376762798 LEFT JOIN _Media_Offer_fk_OfferSkill_offerid_fkSkillid1376762798.fk_DeviceSkill_skillid _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798 ON ( ( _Media_Offer_fk_OfferSkill_offerid_fkSkillid1376762798.id = _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.skillid ) AND ( _Media_Offer_fk_OfferSkill_offerid1376762798.requiredskilllevel > 0 ) AND ( _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.skilllevel >= _Media_Offer_fk_OfferSkill_offerid1376762798.requiredskilllevel ) ) WHERE ( _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.deviceid = _Media_Tracking_fkSubscriptiontrackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id_fk_CallCenterGroup_id_fk_CallCenterGroupCallCenter_callcentergroupid_fk_CallCenter_id_fk_Device_callcenterid.id ) AND ( _Media_Offer1376762798.id = _Media_Tracking_fkSubscriptiontrackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id.id ) LIMIT 1) ) >= ( (SELECT COUNT( _Media_Offer_fk_OfferSkill_offerid580727446.id ) as COUNT_group FROM Media_Offer _Media_Offer580727446 LEFT JOIN _Media_Offer580727446.fk_OfferSkill_offerid _Media_Offer_fk_OfferSkill_offerid580727446 WHERE ( _Media_Offer580727446.id = _Media_Tracking_fkSubscription_trackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id.id ) AND ( _Media_Offer_fk_OfferSkill_offerid580727446.requiredskilllevel > 0 ) LIMIT 1) ) )
Is being converted to this sql block:
(l11.id IS NULL OR (SELECT COUNT(l44.id) AS COUNT_group FROM local_media.Offer l41 LEFT JOIN local_media.OfferSkill l42 ON l41.id = l42.offerid LEFT JOIN local_media.Skill l43 ON l42.skillid = l43.id LEFT JOIN local_media.DeviceSkill l44 ON ((l43.id = l44.skillid AND l42.requiredskilllevel > 0 AND l44.skilllevel >= l42.requiredskilllevel)) WHERE (l44.deviceid = l11.id AND l41.id = l5.id) LIMIT 1) ) >= ( (SELECT COUNT(l46.id) AS COUNT_group FROM local_media.Offer l45 LEFT JOIN local_media.OfferSkill l46 ON l45.id = l46.offerid WHERE (l45.id = l5.id AND l46.requiredskilllevel > 0) LIMIT 1))
in generateCallHopperModular this dql block: ( ( ( ( Media_Tracking_fkSubscriptiontrackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id_fk_CallCenterGroup_id_fk_CallCenterGroupCallCenter_callcentergroupid_fk_CallCenter_id_fk_Device_callcenterid.id IS NULL ) ) ) ) OR ( ( (SELECT COUNT( _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.id ) as COUNT_group FROM Media_Offer _Media_Offer1376762798 LEFT JOIN _Media_Offer1376762798.fk_OfferSkill_offerid _Media_Offer_fk_OfferSkill_offerid1376762798 LEFT JOIN _Media_Offer_fk_OfferSkill_offerid1376762798.fkSkillid _Media_Offer_fk_OfferSkill_offerid_fkSkillid1376762798 LEFT JOIN _Media_Offer_fk_OfferSkill_offerid_fkSkillid1376762798.fk_DeviceSkill_skillid _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798 ON ( ( _Media_Offer_fk_OfferSkill_offerid_fkSkillid1376762798.id = _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.skillid ) AND ( _Media_Offer_fk_OfferSkill_offerid1376762798.requiredskilllevel > 0 ) AND ( _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.skilllevel >= _Media_Offer_fk_OfferSkill_offerid1376762798.requiredskilllevel ) ) WHERE ( _Media_Offer_fk_OfferSkill_offerid_fkSkillid_fk_DeviceSkill_skillid1376762798.deviceid = _Media_Tracking_fkSubscriptiontrackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id_fk_CallCenterGroup_id_fk_CallCenterGroupCallCenter_callcentergroupid_fk_CallCenter_id_fk_Device_callcenterid.id ) AND ( _Media_Offer1376762798.id = _Media_Tracking_fkSubscriptiontrackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id.id ) LIMIT 1) ) >= ( (SELECT COUNT( _Media_Offer_fk_OfferSkill_offerid580727446.id ) as COUNT_group FROM Media_Offer _Media_Offer580727446 LEFT JOIN _Media_Offer580727446.fk_OfferSkill_offerid _Media_Offer_fk_OfferSkill_offerid580727446 WHERE ( _Media_Offer580727446.id = _Media_Tracking_fkSubscription_trackingid_fk_Campaign_id_fk_OfferCampaign_campaignid_fk_Offer_id.id ) AND ( _Media_Offer_fk_OfferSkill_offerid580727446.requiredskilllevel > 0 ) LIMIT 1) ) )
Is being converted to this sql block:
(l11.id IS NULL OR (SELECT COUNT(l44.id) AS COUNT_group FROM local_media.Offer l41 LEFT JOIN local_media.OfferSkill l42 ON l41.id = l42.offerid LEFT JOIN local_media.Skill l43 ON l42.skillid = l43.id LEFT JOIN local_media.DeviceSkill l44 ON ((l43.id = l44.skillid AND l42.requiredskilllevel > 0 AND l44.skilllevel >= l42.requiredskilllevel)) WHERE (l44.deviceid = l11.id AND l41.id = l5.id) LIMIT 1) ) >= ( (SELECT COUNT(l46.id) AS COUNT_group FROM local_media.Offer l45 LEFT JOIN local_media.OfferSkill l46 ON l45.id = l46.offerid WHERE (l45.id = l5.id AND l46.requiredskilllevel > 0) LIMIT 1))
This makes no sense and is breaking the query.