[PHPCR-118] THIS ISSUE TRACKER MOVED TO GITHUB Created: 28/Feb/14  Updated: 28/Feb/14

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

Type: Documentation Priority: Blocker
Reporter: David Buchmann Assignee: David Buchmann
Resolution: Unresolved Votes: 0
Labels: None


 Description   

We moved the issue tracking for phcpr-odm to github. Please go to https://github.com/doctrine/phpcr-odm/issues/






[PHPCR-117] cp Created: 21/Dec/13  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: Major
Reporter: Roger Mbiama Assogo Assignee: Lukas Kahwe
Resolution: Incomplete Votes: 0
Labels: oracle
Environment:

cpsess8119434838/frontend


Attachments: File CGI.pm    

 Description   

*/
final class PhpParser
{
/**

  • Parses a class.
    *
  • @param \ReflectionClass $class A <code>ReflectionClass</code> object.
  • @return array A list with use statements in the form (Alias => FQN).
    */
    public function parseClass(\ReflectionClass $class)
    {
    if (method_exists($class, 'getUseStatements')) { return $class->getUseStatements(); }

if (false === $filename = $class->getFilename())

{ return array(); }

$content = $this->getFileContent($filename, $class->getStartLine());

if (null === $content) { return array(); }

$namespace = preg_quote($class->getNamespaceName());
$content = preg_replace('/^.?(\bnamespace\s+' . $namespace . '\s[;

{].*)$/s', '\\1', $content); $tokenizer = new TokenParser('<?php ' . $content); $statements = $tokenizer->parseUseStatements($class->getNamespaceName()); return $statements; }

/**

  • Get the content of the file right up to the given line number.
    *
  • @param string $filename The name of the file to load.
  • @param int $lineNumber The number of lines to read from file.
  • @return string The content of the file.
    */
    private function getFileContent($filename, $lineNumber)
    {
    if ( ! is_file($filename)) { return null; }

$content = '';
$lineCnt = 0;
$file = new SplFileObject($filename);
while (!$file->eof()) {
if ($lineCnt++ == $lineNumber)

{ break; }

$content .= $file->fgets();
}

return $content;
}
}






[PHPCR-116] Move exception messages into factory methods Created: 02/Sep/13  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: Improvement Priority: Minor
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: Easy-Pick


 Description   

By now there are a lot of exception messages spread all over the code. They should be moved to factory methods of the respective exception classes. Some of them already are.

Follow-up of PHPCR-71



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/431





[PHPCR-115] language fallback broken Created: 26/Jul/13  Updated: 04/Aug/13  Resolved: 04/Aug/13

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

Type: Bug Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

the language fallback is broken. instead of falling back, translated fields are null if a translation is not available (for example in the sandbox) http://cmf.liip.ch/de/company



 Comments   
Comment by David Buchmann [ 04/Aug/13 ]

https://github.com/doctrine/phpcr-odm/pull/304





[PHPCR-114] loadClassMetadata is never triggered Created: 15/Jul/13  Updated: 22/Jul/13  Resolved: 22/Jul/13

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

Type: Bug Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Invalid Votes: 0
Labels: None


 Description   

http://docs.doctrine-project.org/projects/doctrine-phpcr-odm/en/latest/reference/events.html#lifecycle-events the lifecycle callback loadClassMetadata is never triggered on the document.



 Comments   
Comment by David Buchmann [ 22/Jul/13 ]

loadClassMetadata turned out to not be a lifecycle callback but only an event.





[PHPCR-113] NodeName start on non-ansi charset Created: 03/Jul/13  Updated: 23/Aug/13  Resolved: 23/Aug/13

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

Type: Bug Priority: Major
Reporter: Ivan Borzenkov Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

I try create nodes by Doctrine Phpcr ORM and manual

$node = new Folder();
$node->setNodename($name);
$parent = $this->dm->find(null, '/documents');
$node->setParent($parent);
$this->dm->persist($node);
$this->dm->flush();

$name = 'test-тест'; test-тест
$name = 'тест-test'; -test
$name = 'тест'; documents

$session = $this->container->get('doctrine_phpcr.default_session');
$root = $session->getRootNode();
$node = $root->getNode('documents');
$node->addNode($name, 'sling:Folder');
$session->save();

$name = 'test-тест'; test-тест
$name = 'тест-test'; тест-test
$name = 'тест'; тест



 Comments   
Comment by Ivan Borzenkov [ 03/Jul/13 ]

in jackalope fixed
https://github.com/jackalope/jackalope/issues/32





[PHPCR-112] Add a Datetime type annotation Created: 20/Jun/13  Updated: 04/Aug/13  Resolved: 04/Aug/13

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

Type: Bug Priority: Minor
Reporter: François Zaninotto Assignee: Lukas Kahwe
Resolution: Invalid Votes: 0
Labels: None


 Description   

I can only create documents with Dates, not with Datetimes. For a CMF, where keeping track of updates is critical, this is a requirement.



 Comments   
Comment by David Buchmann [ 04/Aug/13 ]

the thing called date in phpcr and phpcr-odm is a datetime object, so you can store a full timestamp. please do a PR on the phpcr-odm-documentation to clarify that if the doc is confusing atm.





[PHPCR-111] remove deprecated event classes before releasing Created: 26/May/13  Updated: 21/Jun/13  Resolved: 21/Jun/13

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

Type: Task Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

remove obsolete event arg classes after the next release, see https://github.com/doctrine/phpcr-odm/pull/288



 Comments   
Comment by David Buchmann [ 06/Jun/13 ]

i did not delete the classes yet, we currently still trigger those events and they extend the good events. but we could do that now as we have a release.





[PHPCR-110] getAssociationTargetClass targetDocument not set Created: 13/May/13  Updated: 26/May/13  Resolved: 26/May/13

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

Type: Bug Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

follow up of https://github.com/doctrine/phpcr-odm/pull/279

ClassMetadata

// TODO this may be not set. what happens if we would return null then?
return $this->mappings[$fieldName]['targetDocument'];

investigate and fix once 279 is merged.



 Comments   
Comment by David Buchmann [ 26/May/13 ]

fixed by https://github.com/doctrine/phpcr-odm/pull/286





[PHPCR-109] Why Generic::getNodename and not camelcase? Created: 11/May/13  Updated: 23/Aug/13  Resolved: 23/Aug/13

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

Type: Bug Priority: Major
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Is there a reason why the get node name method on the generic document is ->getNodename and not ->getNodeName?



 Comments   
Comment by David Buchmann [ 13/May/13 ]

because the field is mapped as nodename, not nodeName. its representing $node->getName() - calling it just name seemed to confusing.

i vote against it, but if we want to change the mapping, we should do that right now, as i am breaking everything anyways in https://github.com/doctrine/phpcr-odm/pull/279

Comment by David Buchmann [ 04/Aug/13 ]

ok if we close this and leave as is?





[PHPCR-108] suport entity listeners resp document listeners Created: 05/May/13  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: New Feature Priority: Minor
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

see http://docs.doctrine-project.org/en/latest/reference/events.html#entity-listeners






[PHPCR-107] Support for ->sameNode type queries in QueryBuilder/ExpressionBuilder Created: 20/Apr/13  Updated: 25/Apr/13  Resolved: 25/Apr/13

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

Type: Improvement Priority: Major
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: 1.0


 Description   

We should support sameNode operator of the QOMFactory in the QueryBuilder.

An example using the PHPCR QB from the DoctrinePHPCRAdminBundle:

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
        $qb = $queryProxy->getQueryBuilder();
        $qmf = $qb->getQOMFactory();

        $constraint = null;
        foreach ($idx as $id) {
            $path = $this->getBackendId($id);
            $condition = $qmf->sameNode($path);
            if ($constraint) {
                $constraint = $qmf->orConstraint($constraint, $condition);
            } else {
                $constraint = $condition;
            }
        }
        $qb->andWhere($constraint);


 Comments   
Comment by Daniel Leech [ 25/Apr/13 ]

https://github.com/doctrine/phpcr-odm/pull/280





[PHPCR-106] Make getRefererrs return not-yet-flushed referring documents Created: 22/Mar/13  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: Task Priority: Major
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Won't Fix Votes: 0
Labels: documentmanager


 Description   

Currently the DocumentManager->getReferrers() method returns only referrers that have already been flushed to the database.

It is (I think) desireable for this method to return also those objects which have been added to the UnitOfWork but have not yet been flushed to the database.



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

this is the same for searching as well, you don't find non-flushed things. i suggest we just document that on the getReferrers method that you only get flushed data.

note that currently there is the issue that initialized collections are not refreshed, which is something we hope to fix eventually.





[PHPCR-105] ensure xml and yml naming conventions are consistent Created: 21/Mar/13  Updated: 06/Jun/13  Resolved: 06/Jun/13

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

Type: Bug Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

for yml, all mappings must use camelCase, while for xml it must be connected-text in all lowercase with the dash between. it seems at least fieldName is wrong.

we should clean this up before the first release to avoid having to deal with inconsistent legacy from the beginning.



 Comments   
Comment by David Buchmann [ 19/Apr/13 ]

for xml, see this PR https://github.com/doctrine/phpcr-odm/pull/279

Comment by David Buchmann [ 19/Apr/13 ]

yml is using camelCase everywhere. should we rename fieldName to name as well or is that fine here?





[PHPCR-104] implement unitofwork isScheduledDocument Created: 19/Mar/13  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: Minor
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

as discussed in https://github.com/doctrine/phpcr-odm/pull/268 we should implement UnitOfWork::isScheduledDocument and isScheduledFor* other than isScheduledForInsert.



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/426





[PHPCR-103] map node autoname feature Created: 13/Mar/13  Updated: 02/Sep/13  Resolved: 02/Sep/13

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

we should map the Node::addNodeAutonamed as an option for the nodename field to have nodes that generate their own name (i.e. useful in children collection)



 Comments   
Comment by David Buchmann [ 14/Mar/13 ]

probably this should be a special id generator strategy like parent and nodename, where nodename is generated. is there a way to pass a parameter to the strategy? or would this need to be a separate option on the "@Id"? addNodeAutoname can accept an optional parameter to control parts of the generated name.
btw, this will be funny as this strategy can not really "generate" an id, it needs to actually create the node to have the name generated. so actually we have no id until we actually flush...

and there is this issue to handle as well
https://github.com/doctrine/phpcr-odm/commit/a4075caadd97312cc53bccf57ff8baf593df65d4

Comment by Lukas Kahwe [ 24/Aug/13 ]

https://github.com/doctrine/phpcr-odm/pull/321

Comment by David Buchmann [ 02/Sep/13 ]

pr was merged





[PHPCR-102] DocumentManager::reorder can not be called multiple times for the same parent Created: 01/Mar/13  Updated: 19/Apr/13  Resolved: 19/Apr/13

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

Type: Bug Priority: Blocker
Reporter: David Buchmann Assignee: David Buchmann
Resolution: Fixed Votes: 0
Labels: None


 Description   

unless i really misread the code in UnitOfWork::scheduleReorder, trying to reorder more than one child of the same parent document will drop the previous reordering.

the whole method is of limited use, as you can also reorder the children in the ChildrenCollection.



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

expand to have an array of reorderings per parent instead of just one reordering.

Comment by David Buchmann [ 19/Apr/13 ]

https://github.com/doctrine/phpcr-odm/pull/278





[PHPCR-101] MissingTranslationException when parent is not translated Created: 01/Mar/13  Updated: 23/Aug/13  Resolved: 23/Aug/13

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

Type: Bug Priority: Major
Reporter: Roel Sint Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

Getting a MissingTranslationException when displaying a banner on the frontend. It seems to be caused in the refreshDocumentForProxy method on line 496 of UOW, the parent document does not have a locale and therefore the fallback hint is false. The banner block is not translated and the banner images are (title property).

See for a stacktrace: https://gist.github.com/rmsint/2c6700e00c47c95dc30e



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

roel, can you please test with the latest phpcr-odm? we think this should be fixed now.

Comment by David Buchmann [ 04/Aug/13 ]

ping roel





[PHPCR-100] The mixin `jcr:lastModified` is not updated Created: 01/Mar/13  Updated: 24/Aug/13  Resolved: 24/Aug/13

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

Type: Bug Priority: Major
Reporter: Pierre-Louis LAUNAY Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

If the document have `jcr:lastModified`, this attribute is filled on create but not updated when a document is modified.

I tried to set manually this attribute and it is not updated too.



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

jackrabbit for example does not automatically update this field. but setting it manually should work, so this could be a bug of phpcr-odm

Comment by David Buchmann [ 19/Apr/13 ]

Pierre-Louis LAUNAY could you investigate why manually setting the field does not work? it could be that the phpcr-odm UnitOfWork ignores the field, or also that jackalope ignores changes to the field...

Comment by Lukas Kahwe [ 24/Aug/13 ]

this issue appears to have been fixed:
https://github.com/doctrine/phpcr-odm/commit/d0a2a2ec22f5b4dba4db5704905a958ab75ce718





[PHPCR-99] Support configuring mixin node types Created: 24/Feb/13  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

we should have a document level mapping to declare arbitrary mixins (like mix:created and mix:lastModified to have autogenerated timestamp fields that then can be mapped)



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

uwe did that, thanks.





[PHPCR-98] replace child document Created: 22/Feb/13  Updated: 21/Jun/13  Resolved: 02/Mar/13

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

when replacing a mapped child with a new document, we get the cannotMoveByAssignment exception, which imo is a) the wrong message as its not about setting a tracked document to become a child somewhere else but what we should do is delete the existing child document and add the new one.

this happens at https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1912

for multiple children, i am less sure how it should work, if it is possible the same way:
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L935



 Comments   
Comment by David Buchmann [ 22/Feb/13 ]

there is a PR to add a form element for an image. when using this, the containing class needs to work around this bug for now https://github.com/doctrine/DoctrinePHPCRBundle/pull/37

Comment by David Buchmann [ 02/Mar/13 ]

the PR got merged https://github.com/doctrine/phpcr-odm/pull/253

as a side note: what speaks against moving the issues to github and drop this jira project? it would be much more user friendly for reporting bugs, and easier to integrate. and i don't think we use any of the fancy jira features really. (github has tags and now even milestones, if we would want to use them)

Comment by David Buchmann [ 21/Jun/13 ]

note that as of this time, this is not fully fixed: if the child has children of its own, there is an error about detached documents. see https://github.com/doctrine/phpcr-odm/pull/262





[PHPCR-97] Allow QB / XB to sepcify objects as targets Created: 20/Feb/13  Updated: 15/Feb/14

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

Type: New Feature Priority: Minor
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Unresolved Votes: 0
Labels: querybuilder,


 Description   

Allow the query builder expression to specify an object as a target.

Unable to find source-code formatter for language: querybuilder. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
$qb->where($qb->expr()->eq('someObjectReference', $someObject);

So if the target passed is mapped and it is referenceable then replace the object instance with its UUID.



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

dan, is this still relevant? if so, can you create an issue on phpcr-odm on github so that we can move away from this jira?





[PHPCR-96] Clean up event argument classes Created: 20/Feb/13  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: Improvement Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: 1.0


 Description   

clean up the event argument classes to only use specific classes if needed, and base on doctrine commons events

see https://github.com/doctrine/phpcr-odm/pull/246 and https://github.com/doctrine/phpcr-odm/issues/245



 Comments   
Comment by David Buchmann [ 12/Mar/13 ]

there is the PR https://github.com/doctrine/phpcr-odm/pull/248 now

Comment by David Buchmann [ 18/Apr/13 ]

https://github.com/doctrine/phpcr-odm/pull/248





[PHPCR-95] Support parameter binding in QueryBuilder (depends Jackalope support) Created: 19/Feb/13  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: New Feature Priority: Minor
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: querybuilder,


 Description   

Parameter binding is not currently implemented in the QueryBuilder, and the comments seem to indicate that this is because jackalope does not support it at the moment.



 Comments   
Comment by David Buchmann [ 12/Mar/13 ]

this would be possible once https://github.com/jackalope/jackalope/issues/59 has been done

Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/429





[PHPCR-94] Implement ->iterate on Query object Created: 19/Feb/13  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: New Feature Priority: Minor
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: query


 Description   

Implement the Query->iterate method which will return an IteratableResultSet as per the ORM.



 Comments   
Comment by David Buchmann [ 02/Oct/13 ]

is this done? if not, is it trivial?

Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/425





[PHPCR-93] Implement ->clone() method on Query object Created: 19/Feb/13  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: New Feature Priority: Minor
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

As with the ORM query object, implement the ->clone() method.



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/413





[PHPCR-92] Join support in QueryBuilder Created: 19/Feb/13  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: New Feature Priority: Critical
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: querybuilder,

Issue Links:
Dependency
is required for PHPCR-84 make the query API work with child tr... Closed

 Description   

Joins are currently not supported in the QueryBuilder, the methods are there and some of the logic is partially coded, but they just havn't been implemented.

At time of writing joins are not supported by doctrine-dbal (i think) but they are supported at least by Jackrabbit.



 Comments   
Comment by David Buchmann [ 18/Sep/13 ]

the querybuilder was refactored in https://github.com/doctrine/phpcr-odm/pull/318 and joins would now be easy doable, but are disabled for now. needs to be investigated to be sure it all makes sense.

Comment by David Buchmann [ 02/Oct/13 ]

any chance we can solve this before 1.0?





[PHPCR-91] getSIngleResult throws ambiguous Exception Created: 19/Feb/13  Updated: 22/Aug/13  Resolved: 22/Aug/13

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

Type: Bug Priority: Blocker
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: 1.0, query


 Description   

Query->getSingleResult correctly throws an Exception when there are no results (or more than one), but it is an Exception that could also be produced by other things, so not guaranteed to mean that (
(http://docs.doctrine-project.org/projects/doctrine-phpcr-odm/en/latest/reference/query.html#getsingleresult)



 Comments   
Comment by Lukas Kahwe [ 22/Aug/13 ]

https://github.com/doctrine/phpcr-odm/pull/320





[PHPCR-90] referrer delete and cascade delete Created: 19/Feb/13  Updated: 12/Mar/13  Resolved: 12/Mar/13

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

currently, removing an entry from the referrer collection has no effect, nothing is deleted.

without cascading, we should delete the value from the referencing property (needs the filter(mappedBy) attribute again), with cascading we should delete the referencing document.

see also https://github.com/doctrine/phpcr-odm/pull/234



 Comments   
Comment by David Buchmann [ 19/Feb/13 ]

adding something to the referrers collection is also not taken into account atm.

Comment by David Buchmann [ 12/Mar/13 ]

https://github.com/doctrine/phpcr-odm/pull/252





[PHPCR-89] child documents are not translateable? Created: 07/Feb/13  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: Bug Priority: Major
Reporter: Norbert M Haigermoser Assignee: Lukas Kahwe
Resolution: Cannot Reproduce Votes: 0
Labels: i18n, translation
Environment:

ubuntu 12.04, php 5.3,
installed:
doctrine/common [2.3.x-dev bb0aebb] : Common Library for Doctrine projects
doctrine/dbal [2.3.x-dev fd45c6f] : Database Abstraction Layer
doctrine/phpcr-odm [dev-master 76765d1] : Object-Document-Mapper for PHPCR
jackalope/jackalope [dev-master a8ba9db] : Jackalope PHPCR library
jackalope/jackalope-doctrine-dbal [dev-master d8a81bc] : Jackalope Transport library
phpcr/phpcr [2.1.0-beta8] : PHP Content Repository interfaces
phpcr/phpcr-utils [1.0-beta4] : PHP Content Repository implementation independant utilities
symfony/console [2.2.x-dev v2.2.0-RC1] : Symfony Console Component
symfony/yaml [dev-master f198ac2] : Symfony Yaml Component


Attachments: File index_1.php    

 Description   

I just tried the odm on a testproject. but i have a really strange problem with translations. if i add a document which has children - and then try to add a translation to the children documents - the translation will not be saved .... (i tried the same with the symfony cmf - same result )
code:



 Comments   
Comment by David Buchmann [ 12/Mar/13 ]

hi. can you try to write a test case in TranslationHierarchyTest in the phpcr-odm repository and create a pull request for the failing test? we fixed quite some things around this recently, maybe it is fixed now?





[PHPCR-88] locales mapping for language fallback: do not repeat language Created: 01/Feb/13  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

currently the language fallback is defined like this

locales:
en: [en, de]
de: [de, en]

the first option must be the requested language. this is counterintuitive and error prone. saying "en: [de]" would make english always only try german. we should add the locale itself as first locale i think, i see no use case of defining fallbacks where the requested locale is not the one to be preferred.






[PHPCR-87] the document manager did not return a result for findBy(array('id' => 'some/id')) but does for find('some/id') Created: 31/Jan/13  Updated: 19/Apr/13  Resolved: 19/Apr/13

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

Type: Bug Priority: Major
Reporter: Roel Sint Assignee: Lukas Kahwe
Resolution: Invalid Votes: 0
Labels: None


 Comments   
Comment by David Buchmann [ 18/Feb/13 ]

the id is kind of a meta information of the document, not a property. so i am unsure if this can work, as the findBy is querying on the phpcr fields. we can not search on the odm mapped fields, as we do not know which document to search, and different documents could even map differently.

so i am not sure if we can solve this issue at all, except improve the documentation of what findBy is actually using.

or am i missing something, lukas?

Comment by David Buchmann [ 19/Apr/13 ]

findBy filters on properties. the id is the path of the node, not a property. this is thus not a bug.

i converted a lot of doc from the orm to have the right place where we should explain this, adding a warning about this case: https://github.com/doctrine/phpcr-odm-documentation/pull/24





[PHPCR-86] QueryBuilder QOMFactory access Created: 14/Jan/13  Updated: 06/Oct/13  Resolved: 06/Oct/13

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

Type: Documentation Priority: Trivial
Reporter: Daniel Bojdo Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: builder,, qomfactory, query


 Description   

There is getQOMFactory method in PHPCR\Util\QOM\QueryBuilder (very useful) but it isn't in Doctrine\ODM\PHPCR\Query\QueryBuilder (it breaks bc).

Is it mistake or there is/will be another method to access QOMFactory instance?



 Comments   
Comment by Daniel Bojdo [ 15/Jan/13 ]

In fact it's not a bug, there is no docs about DocumentManager methods refactor.

Comment by Lukas Kahwe [ 06/Oct/13 ]

QB was refactored completely





[PHPCR-85] implement querybuilder hydrate array option Created: 14/Jan/13  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: New Feature Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

the query builder can currently hydrate to documents and to phpcr nodes. it should also be possible to hydrate the result into a plain array to avoid creating documents and get the direct query result. (btw note that '*' in sql2 does not mean all properties of a document, but just the path and some other basic things - you always need to specify all fields you want to retrieve explicitly in this case)

for the query builder base work and discussion see https://github.com/doctrine/phpcr-odm/pull/204



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/428





[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:
Dependency
depends on PHPCR-92 Join support in QueryBuilder Closed

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



 Comments   
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:
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.

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 ]

https://github.com/doctrine/phpcr-odm/pull/409





[PHPCR-83] make the test suite run and pass with Doctrine DBAL Created: 22/Oct/12  Updated: 11/Jan/13  Resolved: 11/Jan/13

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

Type: Task Priority: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Reference
relates to PHPCR-47 make it possible to disable exception... Resolved

 Description   

this will likely require some work to disable certain tests relying on features not yet implemented



 Comments   
Comment by Lukas Kahwe [ 10/Jan/13 ]

actually already fixed with the latest changes in phpcr-utils
the issue is that we currently require 1.0-beta3
https://github.com/phpcr/phpcr-utils/compare/1.0-beta3...master#L21R519

Comment by Lukas Kahwe [ 11/Jan/13 ]

https://travis-ci.org/doctrine/phpcr-odm





[PHPCR-82] add support to check if a multivalue property of type array actually changed or not Created: 08/Oct/12  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: Bug Priority: Minor
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

right now we only really support checking the dirty state of MultivaluePropertyCollection instances. however in some cases it might be necessary to convert things to an array, even if there are no actual changes. therefore it would be good to also check the dirty state in case of an array



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

we don't have that collection anymore





[PHPCR-81] Referrers should not return the frozen node of a version in version storage Created: 26/Sep/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: Major
Reporter: Pierre-Louis LAUNAY Assignee: Lukas Kahwe
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

In the document of phpcr.github.com (http://phpcr.github.com/doc/html/phpcr/nodeinterface.html#getReferences%28%29), I quote:

"In implementations that support versioning, this method does not return properties that are part of the frozen state of a version in version storage."

But, the referrers returns some versioned node.






[PHPCR-80] ChildrenCollection is not updated after flush although children where added before Created: 07/Sep/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: Major
Reporter: Uwe Jäger Assignee: Lukas Kahwe
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

If you create children of a document without adding them to the children collection of the parent (with a children annotation) the children collection is not updated after flush, you need to call $dm->clear() to force a reread of the children. The current case was with a parent and its children created in the same flush.



 Comments   
Comment by Uwe Jäger [ 07/Sep/12 ]

Try this code:

$node1 = new Generic();
$node1->setParent($parent);
$node1->setNodename('source');
$this->dm->persist($node1);

$this->childrenNames = array('first', 'second', 'third', 'fourth');
foreach ($this->childrenNames as $childName)

{ $child = new Generic(); $child->setNodename($childName); $child->setParent($node1); $this->dm->persist($child); }

$this->dm->flush();
$this->dm->clear();

$node = $this->dm->find(null, '/functional/source');
$children = $node->getChildren();

// without the clear above $children === NULL, with the clear it works as expected

Comment by David Buchmann [ 14/Jan/13 ]

lukas, is this fixed with the work you did on cascading?

Comment by David Buchmann [ 12/Mar/13 ]

we did a lot of refactoring on cascading lately. uwe, can you check if the problem still exists and do a pull request with a failing test if it exists?

Comment by David Buchmann [ 05/Dec/13 ]

uwe, is this issue still relevant?





[PHPCR-79] metadata type for non-property mappings Created: 03/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

(this is a follow up of https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/56)

ClassMetadata::mapField does not automatically assign a type except for the id field. we should add them here to have type information for things like nodename so for example sonata admin (or the symfony form builder?) can use that information to decide on the widget to use.

open question: is there a natural type mapping for children/parent? should we use MANY_TO_ONE for parent and ONE_TO_MANY for children? or is that a problem as its not arbitrary relations, should we add new types for this?






[PHPCR-78] Exception "Can't remove the protected property: jcr:created" on persist Created: 10/Aug/12  Updated: 30/Aug/12  Resolved: 30/Aug/12

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

Type: Bug Priority: Major
Reporter: damien pitard Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None
Environment:
  • phpcrodm #fc47314043805c1b8d1e998d534abec75874a8e5
  • jackalope #6de09e160a2d56b34d34e8120a254fbe46892fb7
  • jackalope-jackrabbit #3c4fb61bf0c0664d09ef520683842e6426c033e0


 Description   

When a Document contains a reference field (tested with @ReferenceMany(strategy="hard"), @ReferenceOne(strategy="hard")) and a "jcr:created" field in its metadata, then phpcr-odm try to update the protected field (jcr:created) to NULL on persist.

Jackalope throws the following exception :

[PHPCR\NodeType\ConstraintViolationException]
Can't remove the protected property: jcr:created



 Comments   
Comment by damien pitard [ 28/Aug/12 ]

here's a functional test to reproduce the bug https://github.com/pitpit/phpcr-odm/commit/a7e1ba83d78771599181d2dee3c03c5163cf26e7

Comment by Lukas Kahwe [ 30/Aug/12 ]

fixed by https://github.com/doctrine/phpcr-odm/pull/158





[PHPCR-77] document level options inheritance Created: 06/Aug/12  Updated: 03/Jul/13  Resolved: 03/Jul/13

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

Type: Improvement Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

documents extending other documents should inherit the global attributes unless overwritten explicitly.

for example, having @Document(referenceable=true) should be kept for an extending class unless it explicitly sets it to false. currently, attributes are reset on each new @Document tag. (i assume we have the same issue for xml/yml mapping?)



 Comments   
Comment by David Buchmann [ 01/Nov/12 ]

this is fixed for referenceable in https://github.com/doctrine/phpcr-odm/pull/185

Comment by David Buchmann [ 05/May/13 ]

when doing this, we should also fix MappedSuperclass annotation to support all attributes the Document has. in xml mappings mapped-superclass extends document

Comment by David Buchmann [ 03/Jul/13 ]

https://github.com/doctrine/phpcr-odm/pull/294





[PHPCR-76] add support for Selectable in PersistentCollection Created: 03/Aug/12  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Invalid Votes: 0
Labels: None


 Description   

see the ORM






[PHPCR-75] Mapped Superclass cleanup and documentation Created: 23/Jul/12  Updated: 10/Jan/13  Resolved: 10/Jan/13

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

this is a follow-up for https://github.com/doctrine/phpcr-odm/pull/144#issuecomment-7096029

we need to check if mapped superclass is working as it should, and then clarify the doc at https://github.com/doctrine/phpcr-odm-documentation/blob/master/en/reference/inheritance-mapping.rst

i still did not understand what exactly the feature means.



 Comments   
Comment by Lukas Kahwe [ 09/Jan/13 ]

this is cleared up now .. right?

Comment by David Buchmann [ 10/Jan/13 ]

yep, i understand it now. documented a bit in https://github.com/doctrine/phpcr-odm-documentation/commit/1c5ae23df5b8008bad5738ae4eed9a70ec6a4cb7





[PHPCR-74] [translations] allow detached document with locale propagation to mapped associations Created: 18/Jul/12  Updated: 01/Feb/13  Resolved: 01/Feb/13

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

Type: New Feature Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

managed documents can only ever exist once per DocumentManager, and thus only in one language. for this reason we did not want to make the language propagate for mapped children and references (as this would change the content of documents in a hard to understand way - and loading anything in a different language again would still lose the language)

thus we should provide a findTranslation variant to get a detached translated document that fetches all associations as detached as well, keeping the locale setting.

there is no way to handle the write case, but this would cover the read case.



 Comments   
Comment by David Buchmann [ 01/Feb/13 ]

the concept was changed to say that children translations are just updated to the new locale





[PHPCR-73] add support for custom ID generators Created: 17/Jul/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: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

https://github.com/doctrine/doctrine2/pull/206



 Comments   
Comment by David Buchmann [ 12/Mar/13 ]

note that id for phpcr-odm is the phpcr path. so this is not the same as PHPCR-38 where we talk about the uuid generator.

Comment by David Buchmann [ 02/Sep/13 ]

maybe the related refactoring could also provide a way to configure a name hint for the autoname generator. see also https://github.com/doctrine/phpcr-odm/pull/321

Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/430





[PHPCR-72] persist cancels move Created: 19/Jun/12  Updated: 21/Jul/12  Resolved: 21/Jul/12

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

Type: Bug Priority: Minor
Reporter: Freddy H. Assignee: Lukas Kahwe
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

If i have a node that i fetch from the repo using $dm->find()

If i change an attribute in it.
Then i call $dm->move() on it

Then i call $dm->flush().

It will work.

However if i call $dm->persist() on the node (that i already fetched from $dm->find()) and then call $dm->flush()
The $dm->move() won't occur, it will be cancelled, but the attribute i changed will still be updated.



 Comments   
Comment by Lukas Kahwe [ 20/Jul/12 ]

i have to think about if this is a bug or a feature.
its certainly useful to have a way to "cancel" operations ..
f.e. persist() also cancels remove()

then again persist() is i guess viewed by many as a non problematic operation since it commonly doesn't break anything if one persisted an object multiple times.

Comment by Lukas Kahwe [ 21/Jul/12 ]

as i expected this is an intentional feature:
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L518

we could think about adding a dedicated method to "reset" the state, but the ORM doesn't have something like that so i rather not introduce it.





[PHPCR-71] refactor exceptions Created: 12/Jun/12  Updated: 04/Oct/13  Resolved: 04/Oct/13

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

Type: Improvement Priority: Blocker
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 1
Labels: None


 Description   

https://github.com/doctrine/phpcr-odm/pull/144#discussion_r963877 reveiled that we should look into the exception concepts and streamline them.



 Comments   
Comment by David Buchmann [ 02/Sep/13 ]

fixed in https://github.com/doctrine/phpcr-odm/pull/322

created PHPCR-116 as a follow up

Comment by David Buchmann [ 04/Oct/13 ]

see https://github.com/doctrine/phpcr-odm/pull/354





[PHPCR-70] ContentDocument Relationships returning NULL in Action Created: 06/Jun/12  Updated: 21/Jul/12  Resolved: 21/Jul/12

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

Type: Bug Priority: Major
Reporter: Freddy H. Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

So i have 2 Documents:

Page: http://pastebin.com/b5X32JPc

Category: http://pastebin.com/A1gB6kyg

A Category has many pages.

Now here's my (test) action: http://pastebin.com/ypjxqZPu

As you can see, $contentDocument is a page in this case. If i call $contentDocument->category i get back "null".

If however i tell the document manager to fetch the Page document by it's path, then $contentDocument->category will work...

Our conclusion is that if you take the $contentDocument that is passed to your action, and you try to fetch it's ParentDocument inside the action (mapped to a property) you always get null.
However, what is very weird, is that inside twig it works (page.category would work in twig but page->category would return null inside the action, before the twig render)



 Comments   
Comment by David Buchmann [ 06/Jun/12 ]

this might be a bug of combining reference with parent.

[23:06] <dbu> look at vendor/doctrine/phpcr-odm/tests/Doctrine/Tests/ODM/PHPCR/Functional/HierarchyTest.php
[23:07] <dbu> and create a new test that tries to load node C, follow its reference to node B and check if its parent A is not null

Comment by Lukas Kahwe [ 21/Jul/12 ]

i have managed to reproduce the bug .. i am looking into fixing it now.

Comment by Lukas Kahwe [ 21/Jul/12 ]

fixed in master





[PHPCR-69] persist referrers Created: 04/Jun/12  Updated: 11/Jan/13  Resolved: 11/Jan/13

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

Type: New Feature Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

phpcr knows reference and referrer (backlink). the reference is a property of a node with a defined name. the referrer is an information on the node without a property name in PHPCR. we have the annotation @Referrers to map this information onto a document field. the annotation can take an optional filter argument to only use references pointing to this node with a specific phpcr name.

we could add something like the cascade option found in the orm to allow assigning a document to a referrer property and automatically persist it. we will need to explicitly specify the reference property name to be used on the source document in this case (orm uses mappedBy for this)

github user mdekrijger started working on this. today, he wrote: Adding the annotations was quite easy, still figuring out the unitofwork where the actual processing must be implemented. Currently I can't spend much more time on it until end of june. If it isn't done yet by that time, I surely will pick it up from there.



 Comments   
Comment by M. de Krijger [ 27/Jun/12 ]

Could someone assign this to me? If not I will just comment this issue when new info is available

Comment by Lukas Kahwe [ 30/Aug/12 ]

hmm .. bah i guess its not possible to assign the ticket for you unless someone upgrades your account for which i dont have the permissions .. so just keep commenting i guess

Comment by Lukas Kahwe [ 09/Jan/13 ]

i guess this is now fixed?

Comment by David Buchmann [ 10/Jan/13 ]

yes, i think so. you implemented that with the cascading configuration options, didn't you?

Comment by Lukas Kahwe [ 11/Jan/13 ]

yes .. referrer changes are cascaded with control over the cascading





[PHPCR-68] Versionable Item completely loses references Created: 01/Jun/12  Updated: 22/Jul/12  Resolved: 22/Jul/12

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

Type: Bug Priority: Minor
Reporter: Freddy H. Assignee: Lukas Kahwe
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

I have a post that has a reference to a subcategory

When i made my post versionable="full", the current and old versions of post lost this reference.

So when i call $post->subcategory i get back a Generic ODM document instead of a Subcategory Document

I know that relationships are not versionable, but relationships should at least still exist.

The workaround is to get the parent path and make a JCR-SQL2 query to fetch the subcategory document.



 Comments   
Comment by David Buchmann [ 01/Jun/12 ]

note that this could also be a problem in jackalope. we seem to have issues with the frozenNode thing (either in the implementation or in the correct understanding) https://github.com/jackalope/jackalope-jackrabbit/issues/19

Comment by Lukas Kahwe [ 22/Jul/12 ]

please reopen once you have a reproduceable test case, thx





[PHPCR-67] Fetching a node beforehand ruins ordering of collections Created: 25/May/12  Updated: 22/Jul/12  Resolved: 22/Jul/12

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

Type: Bug Priority: Minor
Reporter: Freddy H. Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

Two documents: Category and Subcategory
Category has $subcategories as a PHPCRODM\Children

If Category A has 3 subcategories B1 B2 B3.

If A's subcategories are fetched we would receive them in the following order: B1 B2 B3.

Now if however we fetched the B2 node using the DocumentManager at an earlier line and then fetched the subcategories of A, we would receive them in the following order:
B2 B1 B3



 Comments   
Comment by Lukas Kahwe [ 12/Jun/12 ]

i tried to reproduce the issue in a test case:
https://github.com/doctrine/phpcr-odm/commit/7a3f690cd407f5fc75af4ae3d70b4360c5a499c7

however the test passes. so either the issue is already fixed or i just didn't understand the bug description properly.





[PHPCR-66] handle ParentDocument and Name changes as move operations Created: 22/May/12  Updated: 05/Jun/12  Resolved: 05/Jun/12

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

Type: Improvement Priority: Critical
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

changes to the @ParentDocument and @Name should be translated to move operations. they are the most natural way to move a document in a form.



 Comments   
Comment by David Buchmann [ 05/Jun/12 ]

handled in https://github.com/doctrine/phpcr-odm/pull/141

Comment by David Buchmann [ 05/Jun/12 ]

pull request merged





[PHPCR-65] find with uuid creates duplicate of document Created: 23/Apr/12  Updated: 20/Jul/12  Resolved: 20/Jul/12

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

i am pretty sure the DocumentManager::find() method creates a duplicate document each time you request the document by uuid. it should not just load the node but convert that node to a path and then do the check if the document is cached. if the node is already cached the lookup by uuid is cheap. if not, it is now cached and the lookup by path is cheap. so no overhead, but eliminate the risk of having several instances of the same document.

https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/DocumentManager.php#L279



 Comments   
Comment by Lukas Kahwe [ 19/Jul/12 ]

this issue seems to be fixed https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/DocumentManager.php#L289

Comment by David Buchmann [ 20/Jul/12 ]

thanks, looks good to me now.





[PHPCR-64] add support for child prefetching Created: 20/Apr/12  Updated: 18/Jul/12  Resolved: 18/Jul/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://github.com/jackalope/jackalope/pull/113

the idea would be to set the depth via a mapping on a per model or per collection basis



 Comments   
Comment by Lukas Kahwe [ 21/Apr/12 ]

https://github.com/doctrine/phpcr-odm/compare/master...fetch_depth

Comment by David Buchmann [ 18/Jul/12 ]

this has been merged





[PHPCR-63] event system: prePersist and postPersist Created: 11/Apr/12  Updated: 22/May/12  Resolved: 22/May/12

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

according to http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/events.html#prepersist the persist event is only triggered when persisting a new entity/document. but currently the phpcr-odm uow triggers it during the flush operation.

we have to go over the event system and clean that up.



 Comments   
Comment by Lukas Kahwe [ 12/Apr/12 ]

hmm looking at the UoW code .. i don't see how this is possible:
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1110
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1384

Comment by David Buchmann [ 22/May/12 ]

strange. maybe i was looking at outdated code





[PHPCR-62] avoid dereferencing proxies on save Created: 05/Apr/12  Updated: 10/Apr/12  Resolved: 10/Apr/12

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

chregu found in a large project that the odm seems to resolve all unresolved proxy documents during flush, even if the @ReferenceMany or @Referrer was not touched by the code.

we should make sure this does not happen.






[PHPCR-61] review how the ORM and other ODM's initialize collection properties Created: 04/Apr/12  Updated: 23/Aug/13  Resolved: 23/Aug/13

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

Type: Task Priority: Blocker
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Invalid Votes: 0
Labels: None


 Description   

right now when we for example have a @ReferenceMany but nothing is assigned, then when we read said object from the database that property is set to null. should it rather be initialized as an empty collection?



 Comments   
Comment by Lukas Kahwe [ 23/Aug/13 ]

it seems like the behavior is consistent with the ORM





[PHPCR-60] add finalize step to mapping to calculate and validate Created: 09/Mar/12  Updated: 02/Oct/13  Resolved: 02/Oct/13

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

follow up of the discussion in https://github.com/doctrine/phpcr-odm/pull/120

id strategy:

1. if there is an id with a strategy always use that
2. if not and there is a parent and a node name mapping use the parent strategy
3. else use assigned strategy if there is an id field
4. throw an exception that you can't use this document

finalizing the mapping could have the added benefit of combined validation. for example if assigned strategy is parent and name but there is no field mapped to the name, it would tell this is invalid.

think what should be validated at the finalize point.



 Comments   
Comment by Lukas Kahwe [ 04/Oct/12 ]

added a method for final validation here https://github.com/doctrine/phpcr-odm/pull/180

Comment by David Buchmann [ 02/Oct/13 ]

see https://github.com/doctrine/phpcr-odm/pull/351





[PHPCR-59] have a strategy for ReferenceOne/Many PATH to make it relative Created: 07/Mar/12  Updated: 28/Feb/14  Resolved: 28/Feb/14

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

Type: Improvement Priority: Minor
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

this is a follow-up of
https://github.com/doctrine/phpcr-odm/pull/116

i think a user might need to attach his own strategy to the document manager. we could call this path_relative= and provide "max" that string-compares the target path and the node path and puts as few ../ as necessary. but again this does not block this pull request.



 Comments   
Comment by David Buchmann [ 28/Feb/14 ]

moved to https://github.com/doctrine/phpcr-odm/issues/441





[PHPCR-58] figure out how to handle dangling weak/path ReferenceOne/Many properties Created: 07/Mar/12  Updated: 28/Feb/14  Resolved: 28/Feb/14

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

this is a follow-up of
https://github.com/doctrine/phpcr-odm/pull/116

the problem is: what happens when a ReferenceOne path or weak reference property points to something non-existing? is the property null? is the currently invalid reference removed on save or kept (which would make sense, in case the node at path appears later). but if it is usually kept, how can we delete it if we want?



 Comments   
Comment by David Buchmann [ 28/Feb/14 ]

moved to https://github.com/doctrine/phpcr-odm/issues/440





[PHPCR-57] do not track the original/unmapped values separately Created: 29/Feb/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: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

instead we should just use the current state of the underlying node.



 Comments   
Comment by Lukas Kahwe [ 03/Mar/12 ]

https://github.com/doctrine/phpcr-odm/pull/118

Comment by David Buchmann [ 15/Feb/14 ]

see the PR





[PHPCR-56] Support Hashmaps in fields Created: 26/Feb/12  Updated: 22/Oct/12  Resolved: 08/Oct/12

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

Type: New Feature Priority: Minor
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Reference
is referenced by PHPCR-43 Custom data type Closed

 Description   

we should have an annotation to have multivalue properties be hashmaps, that is arrays with custom keys that get preserved. there are 3 options:

  • two multivalue fields with keys and values respectively. see i.e. https://github.com/symfony-cmf/symfony-cmf/pull/140 (another workaround can be to use the @PostLoad and @PreUpdate hooks to split/merge the arrays)
  • serialize the array into a string field
  • child nodes (performance penalty). they would need to be in a special namespace to be identifyable and have a special format. a node for key-value is a lot. if you want a document with a specific name, you should use child documents directly, not a hashmap with document entry.


 Comments   
Comment by David Buchmann [ 14/Apr/12 ]

I gave the hashmaps some more thought. I think the reason JCR (and thus PHPCR) do not have hashmaps is because an unstructured node basically /is/ a hashmap. It has fields with string names and values of various types.
I think for the ODM, the best approach would be to have a @Hashmap mapping that is a special case of @Child. The value is an array that is mapped to a child node with the name of the field. This even allows to map nested arrays, fields that contain an array are just added as child node with that name. (the only thing i see here: we lose the order as children and properties are handled different).
When loading, the child node (and nested children) are mapped to array, or the propertycollection thing we use for multivalue, if that can handle keys.
i think this would be the most flexible approach and should not even be very difficult. when you store large nested arrays here, it becomes a bit slow but i think that would be a design flaw to use deep nested arrays as odm fields anyways.

the other options i see is adding the array_keys/values split workaround into the odm directly, but that only handles flat arrays and converts all values to string whereas the child node would keep DateTime, int, float, boolean and stream types as well. or we could serialize the array into a string property. but that feels yuk.

Comment by Lukas Kahwe [ 04/Oct/12 ]

see https://github.com/doctrine/phpcr-odm/pull/180





[PHPCR-55] Add mapping for maps/associative arrays Created: 23/Feb/12  Updated: 26/Feb/12  Resolved: 26/Feb/12

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

Type: Improvement Priority: Minor
Reporter: Uwe Jäger Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

Add a mapping for maps or arrays. Either implement as child node or serialize the array to a string. The first approach needs another node being fetched from the repository but allows to search the array.



 Comments   
Comment by Uwe Jäger [ 26/Feb/12 ]

see issue #PHPCR-56





[PHPCR-54] Implement LazyLoad for MANY_TO_ONE referenced docs Created: 22/Feb/12  Updated: 22/Feb/12  Resolved: 22/Feb/12

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

Type: Improvement Priority: Major
Reporter: Christian Stocker Assignee: Lukas Kahwe
Resolution: Can't Fix Votes: 0
Labels: None


 Description   

MANY_TO_MANY referenced are now only loaded on demand (see PHPCR-52) via the ReferenceManyCollection. But MANY_TO_ONE are not yet, to be implemented



 Comments   
Comment by Lukas Kahwe [ 22/Feb/12 ]

there is nothing we can do here .. we need to know the path, so that we can prevent duplicate instances if someone fetches by path and not by uuid.





[PHPCR-53] repository::createDocument is never called Created: 18/Feb/12  Updated: 22/Feb/12  Resolved: 22/Feb/12

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

i tried using repositories. see

https://github.com/symfony-cmf/ChainRoutingBundle/commit/12515f82b02c4a1ef230b05133ec89e03c1af2e0
https://github.com/symfony-cmf/ChainRoutingBundle/commit/edd9f9544eadedb142fefd3ea9bb0c3b293c59d5

however, from looking at the uow code i have the impression that createDocument is never called on DocumentRepository but directly in UOW. shouldn't the uow fetch the repository and build the document with the repository? effectively moving UOW::createDocument impl. to the base repository?



 Comments   
Comment by Lukas Kahwe [ 18/Feb/12 ]

none of the other ODM/ORM seem to have a create*() method in the repository. i suspect using a listener is the right approach and we should remove that method from the DocumentRepository.

Comment by Lukas Kahwe [ 22/Feb/12 ]

removed the method





[PHPCR-52] lazy loading of ReferenceMany fails Created: 15/Feb/12  Updated: 22/Feb/12  Resolved: 22/Feb/12

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

Type: Bug Priority: Major
Reporter: Christian Stocker Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

When I have a document with ReferenceMany "Links", Doctrine PHPCR always loads all those referenced documents, even if I just load the main document. This is obviously very bad for performance.

https://gist.github.com/1838831
is a reproducible use-case. Just ran it twice and you'll see that in the second run, there is

  • one GET request for the initial documents
  • a REPORT request for every referenced document to resolve the UUID to a path
  • a POST request for multi-get-ing all the referenced documents

See also this charles-screenshot
https://img.skitch.com/20120215-8572c4s5mc8gt2da5wjd71512w.jpg

I have no idea where to look at to fix this, so any help would be very appreciated






[PHPCR-51] make it possible to add attributes to type mappings Created: 13/Feb/12  Updated: 16/Feb/12  Resolved: 16/Feb/12

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

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


 Description   

f.e. make it possible to make a string mapped typed translatable inside an inherited class
this will require modifications to the ClassMetadata class:
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Mapping/ClassMetadata.php#L578



 Comments   
Comment by David Buchmann [ 14/Feb/12 ]

see https://github.com/doctrine/phpcr-odm/pull/105

Comment by Lukas Kahwe [ 16/Feb/12 ]

fixed with 115f1961600e6cd4fedbec30f1c7590a4d375d57





[PHPCR-50] fix handling of children on update Created: 13/Feb/12  Updated: 12/Apr/12  Resolved: 12/Apr/12

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

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


 Description   

right now we do not check if individual elements in the collection have been added or removed. furthermore since we can now update the order of children in jackalope, we can implement this in collection persistence as well.



 Comments   
Comment by Lukas Kahwe [ 15/Feb/12 ]

some initial work
https://github.com/doctrine/phpcr-odm/commit/a2dc3bc827ded1f54c7bd4708c4e495935ad39e5

Comment by Lukas Kahwe [ 10/Apr/12 ]

adding/removing is now implemented, reordering is still missing (see https://github.com/doctrine/phpcr-odm/tree/children_updating)





[PHPCR-49] rewrite DocumentRepository::createQuery() to use QOM Created: 08/Feb/12  Updated: 10/Feb/12  Resolved: 10/Feb/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/DocumentRepository.php#L253






[PHPCR-48] add a way to move() nodes Created: 08/Feb/12  Updated: 13/Feb/12  Resolved: 09/Feb/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by David Buchmann [ 13/Feb/12 ]

https://github.com/doctrine/phpcr-odm/pull/103





[PHPCR-47] make it possible to disable exceptions for phpcr implementations without versioning support Created: 06/Feb/12  Updated: 14/Nov/12  Resolved: 14/Nov/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Reference
is referenced by PHPCR-83 make the test suite run and pass with... Resolved

 Description   

so method calls to checkPoint() etc shouldn't fail. full versioning should just set referenceable etc.



 Comments   
Comment by Lukas Kahwe [ 14/Nov/12 ]

https://github.com/doctrine/phpcr-odm/pull/188





[PHPCR-46] ensure that parent mappings are populated after flush Created: 03/Feb/12  Updated: 20/Jul/12  Resolved: 20/Jul/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://github.com/doctrine/phpcr-odm/pull/97#r410832



 Comments   
Comment by David Buchmann [ 20/Jul/12 ]

this is done in UnitOfWork::executeInserts about line 1358

i think we lack a test for this though.





[PHPCR-45] add ability to prime collections Created: 03/Feb/12  Updated: 18/Apr/13  Resolved: 18/Apr/13

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

Type: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://github.com/doctrine/mongodb-odm/commit/2da6e9c92d515edae7c63233740349e0d272b19b



 Comments   
Comment by David Buchmann [ 18/Apr/13 ]

collections are lazy loaded





[PHPCR-44] implement configurable change tracking Created: 31/Jan/12  Updated: 28/Feb/14  Resolved: 28/Feb/14

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

Type: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None


 Description   

http://www.doctrine-project.org/docs/orm/2.2/en/reference/change-tracking-policies.html



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

is this still relevant? should we move it to github or drop it?

Comment by Lukas Kahwe [ 28/Feb/14 ]

see https://github.com/doctrine/phpcr-odm/issues/443





[PHPCR-43] Custom data type Created: 29/Jan/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: New Feature Priority: Minor
Reporter: Thomas Rabaix Assignee: Lukas Kahwe
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Reference
relates to PHPCR-56 Support Hashmaps in fields Closed

 Description   

It will be great to be able to store array as a json in a property. There is no way to define custom mapping type (it is possible with doctrine ORM)



 Comments   
Comment by David Buchmann [ 19/Mar/12 ]

would this be a general solution for http://www.doctrine-project.org/jira/browse/PHPCR-56 ?

Comment by Lukas Kahwe [ 19/Jul/12 ]

yes

Comment by David Buchmann [ 15/Feb/14 ]

see this issue https://github.com/doctrine/phpcr-odm/issues/417





[PHPCR-42] sync the xml/yml mapping driver with the annotation driver Created: 25/Jan/12  Updated: 17/Aug/12  Resolved: 17/Aug/12

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

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


 Description   

especially the locale/version stuff is not yet supported. but also the reference mapping seems to look quite different.



 Comments   
Comment by David Buchmann [ 02/Feb/12 ]

versioning is done now: https://github.com/doctrine/phpcr-odm/pull/96

but we miss tests for the non-annotation mappings

Comment by David Buchmann [ 07/Feb/12 ]

how to proceed:

Comment by David Buchmann [ 13/Feb/12 ]

initial test for annotations is added here, please evolve from this
https://github.com/doctrine/phpcr-odm/commit/38f8bbc8b655aafd099287e18401248c44b40492

Comment by Luis Cordova [ 15/Apr/12 ]

hi dbu, lsmith, i gave thought to this and did some corrections https://github.com/doctrine/phpcr-odm/pull/133

however I am totally disoriented as i see two Mapping folders as follows:

1. https://github.com/doctrine/phpcr-odm/tree/master/tests/Doctrine/Tests/ODM/PHPCR/Functional/Mapping
There is only 1 class here with a TODO which i found not very clear about what to do next

2. https://github.com/doctrine/phpcr-odm/tree/master/tests/Doctrine/Tests/ODM/PHPCR/Mapping
These set of classes was already refactored by someone else before I came in and I guess the work is done

I check the coverage as you said on the annotation driver class so it basically lacks the lifecycle callbacks usage, but where to put these tests in as i am confused


160 0 : if ($annot instanceof ODM\PrePersist) { 161 0 : $metadata->addLifecycleCallback($method->getName(), Event::prePersist); 162 0 : } elseif ($annot instanceof ODM\PostPersist) { 163 0 : $metadata->addLifecycleCallback($method->getName(), Event::postPersist); 164 0 : } elseif ($annot instanceof ODM\PreUpdate) { 165 0 : $metadata->addLifecycleCallback($method->getName(), Event::preUpdate); 166 0 : } elseif ($annot instanceof ODM\PostUpdate) { 167 0 : $metadata->addLifecycleCallback($method->getName(), Event::postUpdate); 168 0 : } elseif ($annot instanceof ODM\PreRemove) { 169 0 : $metadata->addLifecycleCallback($method->getName(), Event::preRemove); 170 0 : } elseif ($annot instanceof ODM\PostRemove) { 171 0 : $metadata->addLifecycleCallback($method->getName(), Event::postRemove); 172 0 : } elseif ($annot instanceof ODM\PostLoad) { 173 0 : $metadata->addLifecycleCallback($method->getName(), Event::postLoad); 174 0 : }

Also i am not very familiar with the schema of the annotation driver how to test so any explanation or help pointers would be great, thanks

Comment by Luis Cordova [ 15/Apr/12 ]

I am so not using jira sorry guys, ---> https://github.com/doctrine/phpcr-odm/pull/133

Comment by David Buchmann [ 09/Jun/12 ]

@craigmarvelley started working on this, promised a pull request soon

Comment by Craig Marvelley [ 11/Jun/12 ]

I've opened a PR here, there's still a bit left to be done that I'm hoping to add in the next few days.

https://github.com/doctrine/phpcr-odm/pull/144

Comment by David Buchmann [ 20/Jun/12 ]

the pull request by craig has meanwhile been merged.

there is still a bit of issues:

the driver looks for the non-namespaced file. i.e. No mapping file found named '/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/routing-extra-bundle/Symfony/Cmf/Bundle/RoutingExtraBundle/Resources/config/doctrine/Route.phpcr.xml' for class 'Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route'.

but if i put that file there and have an error, he tells me Invalid mapping file 'Symfony.Cmf.Bundle.RoutingExtraBundle.Document.Route.phpcr.xml'

so the name determiner seems to be off a bit

Comment by David Buchmann [ 18/Jul/12 ]

also, the mapped superclass feature makes no sense with phpcr-odm, we can simply inherit from document classes.

Comment by David Buchmann [ 20/Jul/12 ]

actually mapped superclass seems to be relevant, but i did not yet understand it and the doc about it should be updated. see discussion in https://github.com/doctrine/phpcr-odm/pull/144#issuecomment-7095570

Comment by Lukas Kahwe [ 17/Aug/12 ]

seems to me like reference/referrer/translation/versioning is all done .. so if there is anything left .. please open a new ticket





[PHPCR-41] MappingException: Class Doctrine\ODM\PHPCR\ReferrersCollection is not a valid document or mapped super class. Created: 04/Jan/12  Updated: 08/Jan/12  Resolved: 08/Jan/12

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

reported by nacmartin https://github.com/symfony-cmf/symfony-cmf/issues/131

Since this property was introduced

https://github.com/symfony-cmf/symfony-cmf/blob/master/src/Symfony/Cmf/Bundle/ContentBundle/Document/StaticContent.php#L44

I have this error when persisting this kind of document in SAB:

MappingException: Class Doctrine\ODM\PHPCR\ReferrersCollection is not a valid document or mapped super class.

Any clue?

=> phpcr-odm should not try to persist a ReferrersCollection. this is just the inverse of the Reference annotation. as this is directional in phpcr, the ReferrersCollection should be immutable by the client.



 Comments   
Comment by David Buchmann [ 08/Jan/12 ]

closed in https://github.com/doctrine/phpcr-odm/pull/89





[PHPCR-40] implement inheritance inside find() Created: 28/Dec/11  Updated: 18/Feb/13  Resolved: 18/Feb/13

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

Type: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


 Description   

meaning if B extends A and someone does ->find('A') that it would find instances of B
this will require changes to ClassMetadataFactory::doLoadMetadata()
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Mapping/ClassMetadataFactory.php#L119



 Comments   
Comment by David Buchmann [ 18/Feb/13 ]

https://github.com/doctrine/phpcr-odm/pull/218





[PHPCR-39] support ArrayCollection with References/Referrers Created: 15/Dec/11  Updated: 03/Feb/12  Resolved: 03/Feb/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None





[PHPCR-38] make it possible to inject a custom UUID service Created: 14/Dec/11  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: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

right now we have hardcoded \PHPCR\Util\UUIDHelper::generateUUID(), but that is a very simplistic implementation and the spec is much broader ..



 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

https://github.com/doctrine/phpcr-odm/pull/401





[PHPCR-37] update for latest doctrine common features Created: 14/Dec/11  Updated: 28/Dec/11  Resolved: 28/Dec/11

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

Type: Task Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

see

https://github.com/doctrine/common/pull/71
https://github.com/doctrine/common/pull/75
https://github.com/doctrine/common/pull/83
https://github.com/doctrine/common/commit/07d2f04408534f0870d9873a420e294a4b0db439 (done)

as well as https://github.com/doctrine/couchdb-odm/commit/56f4ce911c9fd7cf32547a9d454141f250c9de54 (done)



 Comments   
Comment by Lukas Kahwe [ 22/Dec/11 ]

some steps already done by https://github.com/doctrine/phpcr-odm/pull/84

Comment by Marco Pivetta [ 23/Dec/11 ]

Will start working on it tomorrow

Comment by Marco Pivetta [ 25/Dec/11 ]

I started work here https://github.com/Ocramius/phpcr-odm/compare/sync-doctrine-common-metadata-changes

Please notice that I removed a public method (loadMetadataForAlias, I think) from the ClassMetadataFactory.

Also, I'd love to have some help in understanding what Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory#doLoadMetadata($class, $parent, $rootEntityFound) should look like when implemented.

Comment by Marco Pivetta [ 26/Dec/11 ]

For reference, this is being handled at https://github.com/doctrine/phpcr-odm/pull/85

Comment by Lukas Kahwe [ 28/Dec/11 ]

merged





[PHPCR-36] Provide migrations tool Created: 17/Nov/11  Updated: 28/Feb/14  Resolved: 28/Feb/14

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

Type: New Feature Priority: Minor
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Reference
relates to PHPCR-7 add support for "eventual migrations" Resolved

 Description   

when i have existing content and later change the document class to have referenceable=true, this is not updated even on persisting the document again.

uwe: I think there are several other things that fail when you have existing content in the repository - maybe the solution to think about is something like migrations ... that would prevent the performance penalty on ordinary code and still give you the change to change the structure of your documents.

things that come to mind

  • change document class name
  • removing fields
  • change field type
  • bulk changing the values in some field
  • everything related to node types (though, as an additional challenge at least jackrabbit does not allow to remove things from node types through the davex remoting we use in jackalope)


 Comments   
Comment by David Buchmann [ 28/Feb/14 ]

we now have commands to do such things.





[PHPCR-35] referenced documents need to be referenceable Created: 15/Nov/11  Updated: 28/Dec/11  Resolved: 28/Dec/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

currently documents referenced need to have referenceable=true in their document annotation, otherwise the @ReferenceOne silently fails. (see also https://github.com/symfony-cmf/cmf-sandbox/pull/29 )

either phpcr-odm should complain. or it could just add the mix:referenceable to the target document even though it was not declared referenceable.
we could additionally make referenceable=true the default and offer explicit referenceable=false for optimization.



 Comments   
Comment by Uwe Jäger [ 15/Nov/11 ]

I will cover the first part for now, let phpcr -odm complain ...

Comment by Uwe Jäger [ 15/Nov/11 ]

This fixed now, but I can't close that issue ...





[PHPCR-34] replacing a document fails Created: 13/Nov/11  Updated: 22/Feb/12  Resolved: 22/Feb/12

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

when we have a saved document and remove that, then add a document at the same path without a flush in between, we get an exception. the reason is that persist already adds the phpcr node, but scheduleRemove does not remove the phpcrnode right away.

the fix looks like it should be:
UnitOfWork.php 504 remove phpcr node - 1022 do not remove here as it was removed before.

but this leads to a problem that is either in jackalope or the phpcr-odm about /functional/user/phpcr:class being not found.

1) Doctrine\Tests\ODM\PHPCR\Functional\BasicCrudTest::testRemoveAndInsert
PHPCR\ItemExistsException: This node already has a child named user.

/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/vendor/jackalope/src/Jackalope/Node.php:303
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:763
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:404
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:386
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:312
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/tests/Doctrine/Tests/ODM/PHPCR/Functional/BasicCrudTest.php:152



 Comments   
Comment by Lukas Kahwe [ 17/Nov/11 ]

imho this is now fixed. it will throw an \InvalidArgumentException that the document is detached. I have added relevant tests.

i have also created a ticket to add something to the persistence interfaces to make it possible to ensure that a node is cleared back to defaults for all fields not being persisted: http://www.doctrine-project.org/jira/browse/DCOM-77

Comment by David Buchmann [ 23/Jan/12 ]

i still have a problem with this. doing

if ($old_node = $this->dm->find(null, $path))

{ $this->dm->remove($old_node); }

$menuitem = new MultilangMenuItem();
$menuitem->setPath($path);
$menuitem->setName($name);
$menuitem->setLabel($label);

$this->dm->persist($menuitem);
return $menuitem;

leads to an exception. but imo i should be able to do this? what if i want to change the type of document at this location?

InvalidArgumentException
Detached document passed to persist().

Exception trace:
() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:444
Doctrine\ODM\PHPCR\UnitOfWork->doScheduleInsert() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:414
Doctrine\ODM\PHPCR\UnitOfWork->scheduleInsert() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:447
Doctrine\ODM\PHPCR\DocumentManager->persist() at /home/david/liip/symfony-cmf/cmf-sandbox/src/Sandbox/MainBundle/Resources/data/fixtures/030_LoadMenuData.php:90
Symfony\Cmf\Bundle\MenuBundle\Resources\data\fixtures\LoadMenuData->createMenuItem() at /home/david/liip/symfony-cmf/cmf-sandbox/src/Sandbox/MainBundle/Resources/data/fixtures/030_LoadMenuData.php:43
Symfony\Cmf\Bundle\MenuBundle\Resources\data\fixtures\LoadMenuData->load() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/doctrine-data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php:94
Doctrine\Common\DataFixtures\Executor\AbstractExecutor->load() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/doctrine-data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php:55
Doctrine\Common\DataFixtures\Executor\PHPCRExecutor->execute() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/bundles/Doctrine/Bundle/PHPCRBundle/Command/LoadFixtureCommand.php:86
Doctrine\Bundle\PHPCRBundle\Command\LoadFixtureCommand->execute() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:237
Symfony\Component\Console\Command\Command->run() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Component/Console/Application.php:193
Symfony\Component\Console\Application->doRun() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Component/Console/Application.php:106
Symfony\Component\Console\Application->run() at /home/david/liip/symfony-cmf/cmf-sandbox/app/console:16

Comment by Lukas Kahwe [ 02/Feb/12 ]

I guess this is related to adding DocumentManager::merge()
http://www.doctrine-project.org/jira/browse/PHPCR-13

Comment by Lukas Kahwe [ 22/Feb/12 ]

duplicate of http://www.doctrine-project.org/jira/browse/PHPCR-13





[PHPCR-33] ReferenceOne: targetDocument parameter should be optional Created: 13/Nov/11  Updated: 13/Nov/11  Resolved: 13/Nov/11

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: David Buchmann
Resolution: Fixed Votes: 0
Labels: None


 Description   

the targetDocument describes what class to expect in the reference. as the class is usually determined automatically, this parameter should be optional.



 Comments   
Comment by David Buchmann [ 13/Nov/11 ]

ups, sorry. was using an outdated version of phpcr-odm. this already works.





[PHPCR-32] separate the logic to determine the document class for a node Created: 24/Oct/11  Updated: 13/Nov/11  Resolved: 13/Nov/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

when loading a node from the database, you can either explicitly specify the document class to be used or it is determined programmatically. you can inject your own logic, but the default logic is right in UnitOfWork, and duplicated. this should be moved to a separate class for better reusability.

this would also be a good moment to get rid of phpcr:alias in favor of phpcr:class. we could provide an implementation for the old phpcr:alias as one of the resolvers users can plug in, if somebody really prefers the alias approach.



 Comments   
Comment by Lukas Kahwe [ 24/Oct/11 ]

already started to work on that:
https://github.com/doctrine/phpcr-odm/tree/add-parent-annotation-with_cleanups

removing phpcr:alias should be easy to do now ..

Comment by Lukas Kahwe [ 31/Oct/11 ]

the changes were merged, so this ticket can be closed





[PHPCR-31] add support for metadata caching Created: 22/Oct/11  Updated: 28/Dec/11  Resolved: 28/Dec/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Marco Pivetta [ 26/Dec/11 ]

For reference, this is being handled at https://github.com/doctrine/phpcr-odm/pull/85

Comment by Lukas Kahwe [ 28/Dec/11 ]

merged





[PHPCR-30] add support for result caching Created: 22/Oct/11  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: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Duplicate Votes: 0
Labels: None


 Comments   
Comment by David Buchmann [ 15/Feb/14 ]

moved to github https://github.com/doctrine/phpcr-odm/issues/427





[PHPCR-29] Add support to flush only one document through DocumentManager#flush() Created: 22/Oct/11  Updated: 03/Feb/12  Resolved: 03/Feb/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

see https://github.com/doctrine/doctrine2/pull/166



 Comments   
Comment by David Buchmann [ 14/Dec/11 ]

to do this we will also need to implement changesets for the translations. (we skipped that for simplicity and because it is currently unnecessary. we just put the translated fields into phpcr - but in phpcr the Session:save() saves everything)

see last point at https://github.com/doctrine/phpcr-odm/wiki/Multilanguage

Comment by David Buchmann [ 03/Feb/12 ]

https://github.com/doctrine/phpcr-odm/pull/94





[PHPCR-28] figure out proper handling of types in DocumentManager::quote() Created: 10/Oct/11  Updated: 22/Feb/12  Resolved: 22/Feb/12

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

Type: Task Priority: Minor
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None





[PHPCR-27] adding a generic "node" document Created: 12/Sep/11  Updated: 22/Oct/11  Resolved: 22/Oct/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

see http://groups.google.com/group/symfony-cmf-devs/browse_thread/thread/914ba1c32d873ed5



 Comments   
Comment by David Buchmann [ 22/Oct/11 ]

https://github.com/doctrine/phpcr-odm/pull/66





[PHPCR-26] Github-PR-56 by uwej711: Fix metadata loading of builtin documents Created: 25/Aug/11  Updated: 22/Oct/11  Resolved: 22/Oct/11

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

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of

{username}

:

Url: https://github.com/doctrine/phpcr-odm/pull/56

Message:

The wrapped metadata driver ensures that metadata for the builtin
documents is loaded. Still the DoctrineAnnotations need to be registered
with the AnnotationRegistry.

see https://github.com/symfony-cmf/cmf-sandbox/issues/20



 Comments   
Comment by Lukas Kahwe [ 10/Oct/11 ]

can we close this one?





[PHPCR-25] Github-PR-59 by starkj: Referrers Created: 25/Aug/11  Updated: 16/Sep/11  Resolved: 16/Sep/11

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

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of

{username}

:

Url: https://github.com/doctrine/phpcr-odm/pull/59

Message:

first of all: sry, i screwed up the commit history here again

Well this is support for referrers.
This patch provides the new annotation "Referrers".
By default a property of this type stores all referrers (weak and hard) in a collection.
You can specify the option "referenceType" with the values "weak" and "hard" (or null) to only get the one or the other type of referring documents (or both types)
Then there is the option "filterName". It's value is passed to the method "get(Weak)References". Actually the option passed to "get(Weak)References" is called "name" in the spec. I named it "filterName" here as "name" is already assigned.



 Comments   
Comment by David Buchmann [ 16/Sep/11 ]

that pull request was merged.

its nice that this jira creates tickets from pull requests - would be even better if they also close automatically with closing the pull request





[PHPCR-22] find('\Foo\Bar', $path) vs find('Foo\Bar', $path) Created: 04/Aug/11  Updated: 02/Feb/12  Resolved: 02/Feb/12

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

Type: Bug Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

I just noticed that we have an issue in our metadata loading in case a document name is prefixed with a backslash when calling find

// fails
$dm->find('\Foo\Bar', $path);

// works
$dm->find('Foo\Bar', $path);

Should the first work as well?

I have traced the issue to the DriverChain

public function loadMetadataForClass($className, ClassMetadata $class)
{
foreach ($this->drivers as $namespace => $driver) {
if (strpos($className, $namespace) === 0)

{ $driver->loadMetadataForClass($className, $class); return; }

}

throw MappingException::classIsNotAValidDocument($className);
}

notice the strpos() does not bother to check if a preceding backslash is in the $className var.



 Comments   
Comment by Lukas Kahwe [ 02/Feb/12 ]

the ORM doesn't handle this either





[PHPCR-21] converting any existing docs to reST so that it can be added to the site Created: 01/Aug/11  Updated: 22/Oct/12  Resolved: 22/Oct/12

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

Type: Documentation Priority: Major
Reporter: Lukas Kahwe Assignee: David Buchmann
Resolution: Fixed Votes: 1
Labels: None


 Description   

PHPCR ODM is listed on the Doctrine website:
http://www.doctrine-project.org/projects/phpcr_odm

build doc in this repository:

https://github.com/doctrine/phpcr-odm-documentation

The next step would be to collect all the various documentation flying around and convert them to reST format:
https://github.com/doctrine/phpcr-odm/wiki/_pages
http://melp.nl/2011/07/symfony2-phpcr-doctrine2-jackalope-recipe/ (needs to be made Symfony2 unspecific)
http://www.craftitonline.com/2011/07/first-symfony2-cmf-based-cms-pagesbundle/ (needs to be made Symfony2 unspecific)
http://cmf.symfony.com/slides.html (needs to be made Symfony2 unspecific)

any other articles flying around?

of course we should also reference PHPCR related docs



 Comments   
Comment by Luis Cordova [ 01/Aug/11 ]

yes it should be something like http://github.com/doctrine/phpcr-odm-documentation

and first commit should have the same structure for doc generation that orm-documentation has

then we can start PR'eing...

hand raised @lsmith

Comment by David Buchmann [ 01/Aug/11 ]

it should be obvious, but the README file of the https://github.com/doctrine/phpcr-odm repository has a lot of the features documented. i propose that this is taken as starting point and once we have the doc up here on the doctrine website, strip down the README to a minum and reference the doc.

the phpcr doc entry point could be http://phpcr.github.com and then we have to work on improving that site too.

Comment by David Buchmann [ 07/Feb/12 ]

we should also point to this (resp. the place this gets online at http://cmf.symfony.com for usage of phpcr-odm inside symfony:
https://github.com/symfony-cmf/symfony-cmf-docs/blob/master/tutorials/installing-configuring-doctrine-phpcr-odm.rst

also note that the install instructions there are partially relevant for phpcr-odm without symfony too.

Comment by David Buchmann [ 18/Jul/12 ]

did a lot of work today, the doc is now largely done, some chapters still missing

Comment by Lukas Kahwe [ 08/Oct/12 ]

is there anything left to still convert?

Comment by David Buchmann [ 22/Oct/12 ]

wouldn't know of missing conversions. doc "just" needs to be completed by writing new chapters and improving the existing ones.





[PHPCR-20] Quality assurance and testing Created: 30/Jul/11  Updated: 28/Dec/11  Resolved: 28/Dec/11

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

Type: Improvement Priority: Minor
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

Look at test coverage and write more tests if necessary. Focus on the exposed api functional tests so the changes to share code with mongo db PHPCR-19 can be tested.






[PHPCR-19] Code cleanup and refactoring, align to other odm implementations Created: 30/Jul/11  Updated: 30/Jul/11  Resolved: 30/Jul/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Duplicate Votes: 0
Labels: None


 Description   

Refactor the code to share more code with mongodb and other ODM implementations. Can we extract stuff into common base classes or adjust mongo so we can extend from it? The current code is often copy-paste with some small edits all over which makes it hard to update with new features and bugfixes from mongodb.

Also have a look at the OXM - we probably could profit from collaboration there too, as PHPCR is somewhere between document store and XML database. http://www.doctrine-project.org/blog/doctrine-oxm-intro

Implement ObjectManager interface and maybe add to the common interfaces like findMany suitable for us.



 Comments   
Comment by David Buchmann [ 30/Jul/11 ]

this is tracked here DCOM-28





[PHPCR-18] Documentation Created: 30/Jul/11  Updated: 03/Aug/11  Resolved: 03/Aug/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Duplicate Votes: 0
Labels: None


 Description   
  • Create better user documentation. The README is far too long, split it.
  • Create some documents for the doctrine website and do a doctrine-project.org/projects/phpcr_odm


 Comments   
Comment by David Buchmann [ 03/Aug/11 ]

was recreated as PHPCR-21 with more information





[PHPCR-17] Id generator and failsafe storage Created: 30/Jul/11  Updated: 22/Oct/11  Resolved: 22/Oct/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

Have an id generator that can build the path (id) from parent node and node name.
(The current setup with the id being the path leaves it to the user to make sure the parent node exists. You get really non-helpful strange error message if the parent does not exist.)



 Comments   
Comment by Lukas Kahwe [ 10/Oct/11 ]

can we close this one?

Comment by David Buchmann [ 22/Oct/11 ]

https://github.com/doctrine/phpcr-odm/pull/66





[PHPCR-16] Annotation for referrers Created: 30/Jul/11  Updated: 02/Sep/11  Resolved: 02/Sep/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

once reference annotation in PHPCR-10 is finished, we should also map the inverse, the list of documents referencing this document. this is a read only property.



 Comments   
Comment by David Buchmann [ 30/Jul/11 ]

see https://github.com/doctrine/phpcr-odm/wiki/References-and-related

Comment by David Buchmann [ 02/Sep/11 ]

johannes stark did that one too https://github.com/doctrine/phpcr-odm/pull/59





[PHPCR-15] Node property mappings Created: 30/Jul/11  Updated: 22/Oct/11  Resolved: 22/Oct/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: David Buchmann
Resolution: Fixed Votes: 0
Labels: None


 Description   
  • Annotation to map node name to a field (read-only except when creating a document). should be NodeName because NAME is one of the property types.
  • Align the annotations with the PHPCR\PropertyType types and map all types (missing for example the PATH type).


 Comments   
Comment by David Buchmann [ 10/Oct/11 ]

i just had a look at this and we are missing the following property types. i added them in https://github.com/doctrine/phpcr-odm/commit/a6032f8dc6574e0ce269653a884eb91ea5234284

  • Double
  • Name
  • Path
  • URI
  • Decimal

On the other hand, Int and Float do not exist. i declared them as convenience alias for Long and Double, as people gessing property names might expect them. ok?
What are the annotations EmbeddedDocument, EmbedOne supposed to do? We should either make them do something or remove them.

What about Tests? I see we only have some tests of annotations and xml/yml mapping, but not for all annotations. Should we do them? Where would be the right place for them?

Further, we are missing annotations for the node name and for the parent node. The later should be similar to the child annotation.

Comment by David Buchmann [ 22/Oct/11 ]

this is cleaned up now





[PHPCR-14] refactor document class detection Created: 30/Jul/11  Updated: 08/Aug/11  Resolved: 08/Aug/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

make document class detection strategy injected. this is in Doctrine/ODM/PHPCR/UnitOfWork.php createDocument

the default strategy should do the current behaviour in that method, but use the explicit parameter first if specified before looking at the phpcr:class attribute.



 Comments   
Comment by David Buchmann [ 08/Aug/11 ]

lukas fixed this in https://github.com/doctrine/phpcr-odm/commit/f60d980851fb1bfb1b9fae93092945bbc9b97b49





[PHPCR-13] Implement DocumentManager::merge() Created: 30/Jul/11  Updated: 09/Jan/13  Resolved: 09/Jan/13

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

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


 Comments   
Comment by David Buchmann [ 22/Oct/12 ]

see also https://github.com/doctrine/phpcr-odm/pull/184

Comment by Lukas Kahwe [ 04/Jan/13 ]

see also https://github.com/doctrine/phpcr-odm/pull/205

Comment by Lukas Kahwe [ 09/Jan/13 ]

205 was merged ..





[PHPCR-12] Use PHPCR\FactoryInterface to bootstrap Created: 29/Jul/11  Updated: 08/Aug/11  Resolved: 08/Aug/11

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

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: David Buchmann
Resolution: Fixed Votes: 0
Labels: None


 Description   

The phpcr-odm should use the factory implementations to bootstrap the phpcr implementation, instead of using new Repository (and jackalope transport and whatnot)



 Comments   
Comment by David Buchmann [ 30/Jul/11 ]

will wait for johannes to see if we have an issue with new $repositoryfactoryclassname().

Comment by David Buchmann [ 08/Aug/11 ]

lukas fixed this





[PHPCR-11] Expose transaction API Created: 01/Jul/11  Updated: 15/Oct/11  Resolved: 15/Oct/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

this requires support in PHPCR/Jackalope



 Comments   
Comment by David Buchmann [ 22/Jul/11 ]

when you get the phpcr session, you can call getTransactionManager on it and do transactions (its pretty simple). lukas, do you think anything more is needed?

@jordi: can you give me more rights in this jira so i can assign tickets?

Comment by Lukas Kahwe [ 10/Oct/11 ]

can we close this one?





[PHPCR-10] add support for (weak)references Created: 01/Jul/11  Updated: 16/Sep/11  Resolved: 16/Sep/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

creating and removing references



 Comments   
Comment by David Buchmann [ 22/Jul/11 ]

Johannes Stark <starkj@gmx.de> is working on that one.

Comment by David Buchmann [ 30/Jul/11 ]

see https://github.com/doctrine/phpcr-odm/wiki/References-and-related

Comment by David Buchmann [ 08/Aug/11 ]

https://github.com/doctrine/phpcr-odm/pull/52

Comment by David Buchmann [ 16/Sep/11 ]

pull request is merged, feature is working.





[PHPCR-9] add logging capabilities Created: 01/Jul/11  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: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

see also http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/logging.html



 Comments   
Comment by David Buchmann [ 05/Dec/13 ]

there is progress for logging on phpcr level: https://github.com/doctrine/DoctrinePHPCRBundle/pull/95





[PHPCR-8] add support for getting node(s) with subnodes at once Created: 01/Jul/11  Updated: 10/Oct/11  Resolved: 10/Oct/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

this requires support for this in PHPCR/jackalope



 Comments   
Comment by Lukas Kahwe [ 19/Aug/11 ]

maybe the only way to support this reasonable is via JOIN's in queries and getSubNodes()

Comment by Lukas Kahwe [ 10/Oct/11 ]

JOINs are indeed the right approach ..





[PHPCR-7] add support for "eventual migrations" Created: 01/Jul/11  Updated: 28/Feb/14  Resolved: 28/Feb/14

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

Type: New Feature Priority: Minor
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Reference
is referenced by PHPCR-36 Provide migrations tool Closed

 Description   

https://doctrine-mongodb-odm.readthedocs.org/en/latest/reference/migrating-schemas.html



 Comments   
Comment by Lukas Kahwe [ 28/Feb/14 ]

see https://github.com/doctrine/phpcr-odm/issues/442





[PHPCR-6] add mappings to reference parents in document properties Created: 01/Jul/11  Updated: 22/Oct/11  Resolved: 22/Oct/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by David Buchmann [ 30/Jul/11 ]

see https://github.com/doctrine/phpcr-odm/wiki/References-and-related

Comment by David Buchmann [ 08/Aug/11 ]

looks like uwe is working on that one: https://github.com/uwej711/phpcr-odm/tree/parent_annotation

Comment by Lukas Kahwe [ 10/Oct/11 ]

can we close this one?

Comment by David Buchmann [ 22/Oct/11 ]

https://github.com/doctrine/phpcr-odm/pull/66





[PHPCR-5] test with Midgard2 PHPCR Created: 01/Jul/11  Updated: 28/Dec/11  Resolved: 28/Dec/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://github.com/bergie/phpcr-midgard2






[PHPCR-4] add mappings to reference versions in document properties Created: 01/Jul/11  Updated: 03/Feb/12  Resolved: 03/Feb/12

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: David Buchmann
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by David Buchmann [ 17/Nov/11 ]

we will work on this at liip and release at least rudimentary support by end of november.

Comment by Lukas Kahwe [ 17/Nov/11 ]

i have talked to David about this a bit.
overall however we don't want to replicate the VersionManager API yet still we want to always give Document instances and not node instances to the user

ideally there should be a way to specify the label one wants to read inside the document annotation, but also inside a property annotation. so that one could for example always get the "draft" label as the document but get the "current" version of the same document as a property. however it would also be nice to be able to get all predecessors as a property.

Comment by David Buchmann [ 03/Feb/12 ]

https://github.com/doctrine/phpcr-odm/pull/96





[PHPCR-3] add support for lazy loading documents Created: 01/Jul/11  Updated: 02/Sep/11  Resolved: 02/Sep/11

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

Type: New Feature Priority: Critical
Reporter: Lukas Kahwe Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by David Buchmann [ 29/Jul/11 ]

Johannes Stark <starkj@gmx.de> is working on that one. It is a pre-requisite for PHPCR-10 (references mapping)

Comment by David Buchmann [ 08/Aug/11 ]

https://github.com/doctrine/phpcr-odm/pull/52

Comment by David Buchmann [ 02/Sep/11 ]

fixed in pull request 52





[PHPCR-2] load document with child annotation Created: 23/Jun/11  Updated: 24/Jun/11  Resolved: 24/Jun/11

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

if i did not previously load a document of the class of the child, phpcr-odm can not know the alias to load it. it throws an exception.

for example, use $this->documentManager->find('My\Class', '/path/to/document'); where My\Class has an @child annotation for a child that is a File. it has the file alias, but phpcr-odm knows nothing of that alias if i did not previously try to find something with 'Doctrine\...\File' that made it load the meta data.

the workaround is to get the repositories to make phpcr-odm know the alias, but this is no solution.
$this->documentManager->getRepository('Doctrine\ODM\PHPCR\Document\Resource');
$this->documentManager->getRepository('Doctrine\ODM\PHPCR\Document\File');

we could add something to specify the document class in the child annotation, but this sounds stupid.

and getting a document without knowing its document class beforehand would be a nice feature in general. however, the info is currently scattered in annotations over the project. any idea how we could make phpcr-odm know all alias to document class mappings?



 Comments   
Comment by David Buchmann [ 23/Jun/11 ]

to implement extracting the mapping, assetic:dump might give some inspiration. in dev mode, we should extract automatically (maybe with some cache lifetime, depending on how expensive that is - its less obvious than what assetic can do)

it would be something like getAllMetadata in our case, then cache it.

Comment by David Buchmann [ 23/Jun/11 ]

according to benjamin, mongo-odm uses an attribute targetDocument that is set to the document class, so the annotation seems not such a bad idea after all.

not sure how to handle a case when we have children with varying document classes, though. but targetDocument would be a start, and cover many common cases.

Comment by David Buchmann [ 23/Jun/11 ]

after more dicussion with benjamin: in mongo, benjamin does no longer store an alias but directly the document class. we could also do that.

Comment by Uwe Jäger [ 24/Jun/11 ]

As you say this is more an issue with the meta-data handling within the odm. The same issue will apply to references and to parent and children annotations I guess. Storing the class directly and loading the meta-data via the class when needed seems a good solution to me.

Comment by David Buchmann [ 24/Jun/11 ]

we now store the phpcr:class instead of phpcr:alias. the alias is still supported for legacy.

https://github.com/doctrine/phpcr-odm/pull/45





[PHPCR-1] children/child annotation add value later Created: 23/Jun/11  Updated: 22/Jul/11  Resolved: 22/Jul/11

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

Type: Bug Priority: Major
Reporter: David Buchmann Assignee: Jordi Boggiano
Resolution: Fixed Votes: 0
Labels: None


 Description   

when using the child annotation, it is not possible to assign a child document with a child of its own after persisting the parent document. to reproduce, take the Functional/FileTest.php and change
$parent->file = new File();
$parent->id = '/functional/filetest';
$parent->file->setFileContentFromFilesystem(dirname(_FILE_) .'/_files/foo.txt');

$this->dm->persist($parent);

to
$parent->id = '/functional/filetest';
$this->dm->persist($parent);

$parent->file = new File();
$parent->file->setFileContentFromFilesystem(dirname(_FILE_) .'/_files/foo.txt');

you will get "mandatory child node

{http://www.jcp.org/jcr/1.0}

content does not exist"



 Comments   
Comment by David Buchmann [ 23/Jun/11 ]

probably related is the issue that updating the normal properties of a child is not stored into phpcr.

Comment by David Buchmann [ 22/Jul/11 ]

https://github.com/doctrine/phpcr-odm/pull/50





Generated at Fri Oct 24 11:18:17 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.