Sylius/SyliusCartBundle — pull request #50 by gregsomers (2013-06-28 03:22:47+00:00)
Title: Fixed transitive association persistence issue (Issue #48)

Solution to Issue #48 - "Incorrect quantity when adding the same product on dev-master".

The changes made to the cart's item collection happen on the inverse side of the relationship, according to doctrine "Changes made only to the inverse side of an association are ignored. Make sure to update both sides of a bidirectional association (or at least the owning side, from Doctrine’s point of view)".

Solution is to explicitly persist the items in the refreshCart function. More info at http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html