Symfony propel-build-sql creates the I18n table with culture column defined like:
culture VARCHAR(7) NOT NULL
Later, not having culture set in an object ...
$o = new Article();
// $o->setCulture('lv');
$o->setTitle('Test Title');
$o->setContent('Test Content');
$o->save();
... saves the object with culture set to an empty string, like:
INSERT INTO blog_article_i18n (TITLE,CONTENT,ID) VALUES ('Test Title','Test Content',1)
Therefore, the simple code like:
$o = ArticlePeer::retrieveByPk(1); // knowing the Pk is correct
$title = $o->getTitle();
... generates the following SQL (showing only the one related to the I18n table):
SELECT blog_article_i18n.TITLE, blog_article_i18n.CONTENT, blog_article_i18n.ID, blog_article_i18n.CULTURE FROM blog_article_i18n WHERE blog_article_i18n.ID=1 AND blog_article_i18n.CULTURE IS NULL
The error is that in this SQL the CULTURE is NEVER NULL by the definition, causing the right object not to be found. The CULTURE here should be an empty string.
Sugguestion: may be it would be a good idea to set any newly created objects to the current culture?