[PHPCR-84] make the query API work with child translation strategy Created: 23/Oct/12  Updated: 15/Feb/14  Resolved: 15/Feb/14

Status: Closed
Project: Doctrine PHPCR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
depends on PHPCR-92 Join support in QueryBuilder Closed


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).

Comment by David Buchmann [ 23/Oct/12 ]

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.

Comment by Lukas Kahwe [ 24/Oct/12 ]

here is an example where i manually handle this:

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.

Comment by Lukas Kahwe [ 24/Oct/12 ]

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.

Comment by Lukas Kahwe [ 11/Jan/13 ]

if we do this change we should provide a migration script

Comment by David Buchmann [ 25/Mar/13 ]

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.

Comment by David Buchmann [ 13/May/13 ]

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

Comment by Willem-Jan [ 14/May/13 ]

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

Comment by Lukas Kahwe [ 06/Oct/13 ]

working for attribute strategy

Comment by David Buchmann [ 15/Feb/14 ]


Generated at Tue Oct 06 14:35:40 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.