doctrine-extensions / DoctrineExtensions

Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable
MIT License
4.03k stars 1.27k forks source link

Using embedded documents for custom translation entities #1267

Closed coudenysj closed 2 years ago

coudenysj commented 9 years ago

I've been playing around with translation entities with MongoDB and it would be cool if the translations were actually embedded in the entity instead of in a different collection.

Is this something this is possible? If not, is it possible to make it possible? If so, how can I help out?

l3pp4rd commented 9 years ago

Hi, currently not sure if that is supported. The closest thing is these personal translations, which stands as a relation, see the documentation maybe it can be updated as an embedded relation..

coudenysj commented 9 years ago

Looks like the embedding is working with the personal translations, but the query still tries to look in a different collection. Will have a look at it when I have time to investigate.

nicodmf commented 8 years ago

I think too, embedded translation is THE good choice for an odm. A document should be unique and relation shouldn't exist for this part, the phpcr solution is in my mind another good choice which save the translation in a field whith custom name : i18n:language-fieldname

markitosgv commented 6 years ago

+1, I think the best approach for MongoDB is an embed document.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.