I have test it only with a mysql ;(
My code:
# $c->add(TableI18nPeer::CULTURE, $culture);
$default_culture = sfConfig::get('sf_i18n_default_culture');
$subSelect = TableI18nPeer::CULTURE." = IF((SELECT i18n.ID FROM
".TableI18nPeer::TABLE_NAME." as i18n WHERE i18n.CULTURE='".$culture."' AND
i18n.ID = ".TablePeer::ID."), '".$culture."', '".$default_culture."')";
$c->add(TableI18nPeer::CULTURE, $subSelect, Criteria::CUSTOM);
greetings
Gordon
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[EMAIL PROTECTED] Im Auftrag von
Fabien POTENCIER
Gesendet: Donnerstag, 26. April 2007 10:12
An: [email protected]
Betreff: [symfony-devs] Re: patch for i18n tables
To be included, you need to have a patch that works with every db
supported by Propel and symfony.
Fabien
Franke Gordon wrote:
> Hello,
>
>
>
> many peopel hast he problem that he get a empty database result if no
> translation data fort he record exist. i have modify/add
> (doSelect|doSelectOne|retrieveByPk)WithI18n functions. It makes a
> subselect and check if the culture exist if not it use the default culture.
>
>
>
> So my questions:
>
> Can i add this to the propel generator files?
>
> And with a optional parameter or per default?
>
>
>
> What you think about that?
>
>
>
>
>
> greetings
>
> Gordon
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---