Doctrine Project

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Doctrine PHPCR
  • Doctrine PHPCR
  • PHPCR-72

persist cancels move

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • 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.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • Source
Hide
Permalink
Lukas Kahwe added a comment - 20/Jul/12 9:15 PM

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.

Show
Lukas Kahwe added a comment - 20/Jul/12 9:15 PM 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.
Hide
Permalink
Lukas Kahwe added a comment - 21/Jul/12 7:54 AM

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.

Show
Lukas Kahwe added a comment - 21/Jul/12 7:54 AM 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.
Lukas Kahwe made changes - 21/Jul/12 7:54 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
  • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=PHPCR-72, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

People

  • Assignee:
    Lukas Kahwe
    Reporter:
    Freddy H.
Vote (0)
Watch (1)

Dates

  • Created:
    19/Jun/12 3:43 PM
    Updated:
    21/Jul/12 7:54 AM
    Resolved:
    21/Jul/12 7:54 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Doctrine Project. Try JIRA - bug tracking software for your team.