Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

persists documents on GET requests #12

Open
RafaelKa opened this issue Apr 1, 2015 · 2 comments
Open

persists documents on GET requests #12

RafaelKa opened this issue Apr 1, 2015 · 2 comments

Comments

@RafaelKa
Copy link

RafaelKa commented Apr 1, 2015

Hi Rens,

following example code persists embedded documents

    /**
     * @param \THM\Products\Domain\Model\Product $product
     * @return void
     */
    public function showAction(\THM\Products\Domain\Model\Product $product) {
        $property = new \THM\Products\Domain\Model\Property();
        $product->addProperty($property);
        $this->view->assign("product", $product);
    }

as you can see, there is no repository used and this is only GET request, but following code creates embedded documents inside Product.

Is there some trick needed?
Or is something from TYPO3.Flow (last two years happened) missing in TYPO3.CouchDB?

PS: i'm on 2.0 Branch

@radmiraal
Copy link
Owner

Confirmed, the code in https://github.com/radmiraal/Radmiraal.CouchDB/blob/2.0/Classes/Radmiraal/CouchDB/Package.php should check if the current request is a safe request just like Flow's Package.php does

@RafaelKa
Copy link
Author

RafaelKa commented Apr 3, 2015

But here is repository never used, why are the changes nonetheless persisted?
Very strange behaviour.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants