propelorm/sfPropelORMPlugin — Issue #101: Missing table name in FROM
Author: coviex
Created: 2011-12-14 17:56:39+00:00
State: open

Hi!

I get SQL error from this code:

```php
$c = new Criteria();
$c->add(Table2::USER_ID, 1, Criteria::NOT_EQUAL);
$c->add(Table2::TYPE, 3, Criteria::GREATER_EQUAL);
$c->addDescendingOrderByColumn(Table2::CREATED_AT);
$c->addJoin(Table1::USER_ID, Table2::USER_ID);

$pager = new sfPropelPager('Table2', 10);
$pager->setCriteria($c);
$pager->setPage(1);
$pager->init();

$pager->getResults();
```

which is working with standard propel plugin.
Unless I add:

```php
$c->setPrimaryTableName(Table1Peer::TABLE_NAME);
```

Regards