You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i like this [] syntax, looks reasonble. and i prefer it over prop-add. prop-add is confusing as you might think you need to know if the property already exists and have no indication it has to do with multivalue.
associative arrays are supported by the ODM layer, but not by PHPCR natively, so we can only have numeric keys here. even in the doctrine bundle, the commands to modify a PHPCR node should not support associative arrays. on phpcr level its just 2 separate arrays, one for keys and one for values.
re our irc discussion, i think we should not add more property things into touch, but rather have phpcr:property:* commands for that. touching a node while creating a property at the same time has some value, but for full flexibility i would go with a separate command.
@dantleech is this still relevant? i guess the phpcr-shell can handle this a lot better and we should remove the node:touch standalone commands in favor of the shell.
Activity
dantleech commentedon May 4, 2013
In regard to modifying an existing node, yeah, touch will happily modify a node at the given path.
I wonder for prop-add if we can do some syntax like
Actually - associative arrays are not supported in PHPCR-ODM .. right?
What would the syntax be for:
--prop-add=foobar=bar
|--prop-set=foobar[]=bar
--prop-set=foobar[1]=bar
--prop-remove=foobar[1]
dbu commentedon May 5, 2013
i like this [] syntax, looks reasonble. and i prefer it over prop-add. prop-add is confusing as you might think you need to know if the property already exists and have no indication it has to do with multivalue.
associative arrays are supported by the ODM layer, but not by PHPCR natively, so we can only have numeric keys here. even in the doctrine bundle, the commands to modify a PHPCR node should not support associative arrays. on phpcr level its just 2 separate arrays, one for keys and one for values.
dbu commentedon Jun 7, 2013
re our irc discussion, i think we should not add more property things into touch, but rather have phpcr:property:* commands for that. touching a node while creating a property at the same time has some value, but for full flexibility i would go with a separate command.
dbu commentedon Feb 9, 2015
@dantleech is this still relevant? i guess the phpcr-shell can handle this a lot better and we should remove the node:touch standalone commands in favor of the shell.