Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating existing entities doesn't work #1

Open
ricbra opened this issue Jul 16, 2012 · 3 comments
Open

Updating existing entities doesn't work #1

ricbra opened this issue Jul 16, 2012 · 3 comments
Labels

Comments

@ricbra
Copy link
Contributor

ricbra commented Jul 16, 2012

When an entity with a bridge to a document is loaded from the database and gets persisted again the following error occurs:

Catchable Fatal Error: Object of class PHPCRProxies__CG__\Netvlies\Bundle\AcmeBundle\Document\TheaterShow could not be converted to string in /home/vagrant/vhosts/acme/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1199

@hacfi
Copy link
Contributor

hacfi commented Jul 19, 2013

I think the changeset needs to be recomputed as it tries to save the object and not the converted value.

@sjopet
Copy link
Contributor

sjopet commented Jul 19, 2013

@hacfi could you make a pr for this? you are probably better aware of this code then us at this point.

@hacfi
Copy link
Contributor

hacfi commented Jul 20, 2013

With the current architecture of the PHPCR ODM UnitOfWork you can't persist a document without updating the entity. It would be if we'd use the preFlush event. I'll look into it to find out if that's an option,

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

No branches or pull requests

3 participants