Doctrine PHPCR
  1. Doctrine PHPCR
  2. PHPCR-84

make the query API work with child translation strategy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Labels:
      None

      Description

      when searching there must be some way to ensure that for translateable documents the right fields are filters. f.e. when using the child strategy then for the given columns the node name needs to be checked (nodename = phpcr_locale:fr).

        Issue Links

          Activity

          Lukas Kahwe created issue -
          Hide
          David Buchmann added a comment -

          sounds like asking for a PHPCR-ODM DQL , then we could handle this perfectly transparent. as an intermediate, a method to build the criterion for a field of a mapped entity would be the right way i think. you could even do that for non-multilang in case you mapped the documents field to some differently named PHPCR property.

          Show
          David Buchmann added a comment - sounds like asking for a PHPCR-ODM DQL , then we could handle this perfectly transparent. as an intermediate, a method to build the criterion for a field of a mapped entity would be the right way i think. you could even do that for non-multilang in case you mapped the documents field to some differently named PHPCR property.
          Hide
          Lukas Kahwe added a comment -

          here is an example where i manually handle this:
          https://github.com/symfony-cmf/SearchBundle/blob/master/Controller/PhpcrSearchController.php

          if we were to do it automatically we might not need our own DQL, we could do a QOMWalker. however i doubt that we can fully automate this, since everything can be mixed. ie. one path can have any number of different strategies.

          Show
          Lukas Kahwe added a comment - here is an example where i manually handle this: https://github.com/symfony-cmf/SearchBundle/blob/master/Controller/PhpcrSearchController.php if we were to do it automatically we might not need our own DQL, we could do a QOMWalker. however i doubt that we can fully automate this, since everything can be mixed. ie. one path can have any number of different strategies.
          Hide
          Lukas Kahwe added a comment -

          btw .. it might make sense to always namespace the property names, even when using the child translation strategy. this could make it easier to deal with searching across mixed translation strategies.

          Show
          Lukas Kahwe added a comment - btw .. it might make sense to always namespace the property names, even when using the child translation strategy. this could make it easier to deal with searching across mixed translation strategies.
          Hide
          Lukas Kahwe added a comment -

          if we do this change we should provide a migration script

          Show
          Lukas Kahwe added a comment - if we do this change we should provide a migration script
          Hide
          David Buchmann added a comment -

          it gets even worse when translated and non-translated documents get mixed up. see for example the cmf sandbox menu admin (not multilang menu). it mixes translated and non-translated documents. since https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/100 you can sort on columns, so sorting will half work half not.

          Show
          David Buchmann added a comment - it gets even worse when translated and non-translated documents get mixed up. see for example the cmf sandbox menu admin (not multilang menu). it mixes translated and non-translated documents. since https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/100 you can sort on columns, so sorting will half work half not.
          David Buchmann made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Critical [ 2 ]
          Lukas Kahwe made changes -
          Priority Critical [ 2 ] Blocker [ 1 ]
          Hide
          David Buchmann added a comment -

          there seem to be other solutions like descendant, but if we had join in jackalope-doctrine-dbal that could be a good option https://github.com/jackalope/jackalope-doctrine-dbal/issues/15

          Show
          David Buchmann added a comment - there seem to be other solutions like descendant, but if we had join in jackalope-doctrine-dbal that could be a good option https://github.com/jackalope/jackalope-doctrine-dbal/issues/15
          Hide
          Willem-Jan added a comment -

          I started working on the Join issue and will start working on this issue when the Join feature is more or less stable.

          Show
          Willem-Jan added a comment - I started working on the Join issue and will start working on this issue when the Join feature is more or less stable.
          Lukas Kahwe made changes -
          Priority Blocker [ 1 ] Major [ 3 ]
          David Buchmann made changes -
          Link This issue depends on PHPCR-92 [ PHPCR-92 ]
          David Buchmann made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          Hide
          Lukas Kahwe added a comment -

          working for attribute strategy

          Show
          Lukas Kahwe added a comment - working for attribute strategy
          Lukas Kahwe made changes -
          Summary make the query API work with i18n make the query API work with child translation strategy
          Description when searching there must be some way to ensure that for translateable documents the right fields are filters. f.e. when using the child strategy then for the given columns the node name needs to be checked (nodename = phpcr_locale:fr). for attributes strategy the property name needs to be rewritten ("title" vs "phpcr_locale:fr-title").

          it might not be possible to easily automate this.
          when searching there must be some way to ensure that for translateable documents the right fields are filters. f.e. when using the child strategy then for the given columns the node name needs to be checked (nodename = phpcr_locale:fr).
          Show
          David Buchmann added a comment - https://github.com/doctrine/phpcr-odm/pull/409
          David Buchmann made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

          This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

          • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=PHPCR-84, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Lukas Kahwe
              Reporter:
              Lukas Kahwe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: