this PR builds on #113, but breaks BC by renaming the "weak" property to "strategy" and switching from a mice boolean/string to a string property.
made it possible to use a PATH property for a weak reference
renamed "weak" property of references to "strategy"
i still think it would be better to have an attribute on the PATH property mapping to have it dereference the path, to make the difference to (weak/strong) references more visible and map the phpcr model more closely. but if you are still convinced, i can live with this. before we merge and bc break i have to things i want to discuss:
Again imho I think you are over thinking this. This feature is an advanced performance optimization.
you can remove a node by simply calling remove() on the document instance. this is the same as with other references. i don't see the difference.
we could also adjust path properties when we do a move, but this would require recursing etc. so i wouldn't do anything there.
i have also thought about that, but imho its cleaner this way to make it clear that there is a lot of "special" logic here. same for @Child vs @Children
Merge remote-tracking branch 'origin/master' into add_weak_reference_…
agreed that adjusting the paths automatically sounds complicated. if you need it use uuid. but what about helping to have relative paths? bad idea?
ok, then lets open a new issue for that. its the same problem actually with weak references. we should know what happens and think what makes sense. http://www.doctrine-project.org/jira/browse/PHPCR-58
exactly. except that 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. http://www.doctrine-project.org/jira/browse/PHPCR-59
so lets merge this. sorry for having been so insistent.
Merge pull request #116 from doctrine/add_weak_reference_path_type_wi…
Add weak reference path type with bc break
ok great .. thx for opening those tickets