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

Loading translations does not cascade to children when there is a document in the hierarchy without translatable fields #611

Open
uwej711 opened this issue Mar 12, 2015 · 5 comments
Labels

Comments

@uwej711
Copy link
Contributor

uwej711 commented Mar 12, 2015

When you have a container block with no translated fields doLoadTranslation will not load the proper translations of the children of that container due to https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L3384

So I have to put a dummy translated field and a locale to the container to make it work.

@dantleech
Copy link
Contributor

After a quick look I think that check makes sense internally (as it would get called for each document anyway), but maybe it should be skipped if the callee is findTranslation() so that it cascades.

@uwej711
Copy link
Contributor Author

uwej711 commented Mar 12, 2015

Or we could check first for cascading and the skip just this document

@dbu
Copy link
Member

dbu commented Mar 13, 2015

hm, i think the fact that a document is translateable should be inherited too. with B extends A , A translatable and B adding nothing translatable, findTranslation should still have an effect on B. so this is a bug to me.

@uwej711
Copy link
Contributor Author

uwej711 commented Mar 13, 2015

@dbu: this is not about inheritance but about parent child relations.

@dbu
Copy link
Member

dbu commented Mar 13, 2015

ach, sorry. yeah, it would make a lot of sense to cascade first and then check whether the document itself is translatable.

@dbu dbu added the bug label Jul 4, 2015
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