[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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-98] replace child document Created: 22/Feb/13  Updated: 02/Mar/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)





[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-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-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-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-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-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-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 Open

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






Generated at Thu May 23 15:23:26 UTC 2013 using JIRA 5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5.