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

[RFC] make it possible to persist serializeable objects in document #461

Open
ElectricMaxxx opened this issue Mar 31, 2014 · 3 comments
Open

Comments

@ElectricMaxxx
Copy link
Contributor

While handling with the SeoMetadata in symfony-cmf/seo-bundle, @wouterj and i came to the conclusion that it would be nice to do have that behavior:
https://github.com/symfony-cmf/SeoBundle/blob/master/Doctrine/Phpcr/SeoMetadataListener.php

somehow as an new field type in the phpcr-odm.
This would be cool for flat value objects. Behind the scenes the phpcr-odm can serialize into an array to persist it as it is done with assoc field and back.

@dbu
Copy link
Member

dbu commented Mar 31, 2014

i think #417 would make sense. then we have about reached the limit of what makes sense - serializing and unserializing objects as a general pattern feels strange to me. you could also map them in phpcr-odm and simply add them as a child then.

@ElectricMaxxx
Copy link
Contributor Author

I do not want a big serialization process or something equal. I see flat value objects very similar to arrays. Just to use some document metadata in a oop way. Would be nothing strange or hard.

@dbu
Copy link
Member

dbu commented Mar 31, 2014

you can map the document. or do with a listener as in SeoBundle - if we provide this in phpcr-odm we would need an interface for that and it feels to specific to me to fit into the odm.

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

No branches or pull requests

2 participants