Skip to content

update queries: allow to copy fields #159

@dbu

Description

@dbu
Member

It would be awesome if this query would work:

UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) SET t.linkCaption = a.linkCaption WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;

but the update processor would need to evaluate the value side, we get

[PHPCR\ValueFormatException] Invalid value for property "originalLinkCaption": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand

Activity

dantleech

dantleech commented on May 5, 2015

@dantleech
Member

Might be easy, depends on the parser. I started writing a new parser implementation but it seems it was one of the few things I pushed to github before I lost the contents of my harddrive :(

added this to the v1.0 milestone on May 5, 2015
dantleech

dantleech commented on Jun 10, 2015

@dantleech
Member

This should be possible with the EXPR function btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dbu@dantleech

        Issue actions

          update queries: allow to copy fields · Issue #159 · phpcr/phpcr-shell