I am using the cakePHP translation behaviour for a project and after
my initial enthusiasm I encountered some of its shortcomings. For
instance, when I have a model, e.g. Article with a translated field
"description", querying the model I will always get an empty result
when there are no translations for this field. I guess this is because
of some inner joins in the sql query. For example in a controller
action:
$article = $this->Article->read(null, $id);
will get an empty result even if there is a record with the id, but no
translation for the field "description". Of course, I can always
unbind the translation like this:
$this->Article->unbindTranslation();
$article = $this->Article->read(null, $id);
getting the data of the untranslated article. But this leads to some
very complicated an lenghty code.
Is there any other way around this?
Greets,
mark
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment