This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » eZ Publish 5 Platform » Basic query generation place
expandshrink

Basic query generation place

Basic query generation place

Friday 07 November 2014 11:19:33 am - 3 replies

Hi

I am running some tests, with eZ Publish 5, and I would like to find out where, in the source code, the following query is being generated.

 SELECT COUNT( * ) count FROM ezcontentobject_tree INNER JOIN ezcontentobject ON ezcontentobject_tree.contentobject_id = ezcontentobject.id 
INNER JOIN ezcontentobject_version ON ezcontentobject.id = ezcontentobject_version.contentobject_id 
  WHERE ( ( ezcontentobject.contentclass_id IN ( SELECT id FROM ezcontentclass 
    WHERE identifier IN ( 'folder', 'feedback_form', 'folder', 'feedback_form', 'gallery', 'forum', 'wiki_page', 'forums', 'event_calendar', 'link', 'blog', 'landing_page' ) ) 
      AND ezcontentobject_tree.is_invisible = :placeholder1 
      AND ezcontentobject_tree.depth BETWEEN :placeholder2 AND :placeholder3 
      AND ezcontentobject_tree.path_string LIKE :placeholder4 
      AND (ezcontentobject.language_mask & 2) > 0 ) 
      AND ( :placeholder5 AND ( ezcontentobject.section_id IN ( '1' ) OR ( ezcontentobject.contentclass_id IN ( '27', '35', '37', '26' ) 
        AND ezcontentobject.section_id IN ( '3' ) ) ) ) ) AND ezcontentobject.STATUS = :placeholder6 AND ezcontentobject_version.STATUS = :placeholder7 
        AND depth <> :placeholder8' with params [0, 2, 3, \"\\/1\\/2\\/%\", \"1\", 1, 1, 0]

More specifically, I would like to learn where the placeholder5 condition is being included.

Can anyone tip me into the direction to look?

Cheers and thanks,
Io

Friday 07 November 2014 12:42:44 pm

:placeholder stuff will be deep down in Legacy storage engine, eZ\Publish\Core\Persistence\Legacy.

As for where these are added, I assume you are referring to where the additional conditions to your original query is added, that is usually in eZ\Publish\Core\Repository\SearchService where the users permission rules are added to every query by default to filter out what she/he/it does not have access to.

 

If you asking where the query is started from in the first place: depends, it's your code / demo bundle code starting it in general.

Friday 07 November 2014 1:28:58 pm

Thank you, André

I've located the source for my issue, and patched it locally.

I'll probably open an issue later in order to provide my patch.

Cheers,
Io

Friday 07 November 2014 1:34:21 pm

Cool, well remember to describe what your issue is, you didn't here blunk.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from