I'm not sure what's going on this time, but I've created a table that
stores users with locations. When i try to pull them though, the
query is adding an id field that isn't part of the table (and of
course failing).
TblApprovalList:
connection: internal_web
tableName: tblApprovalList
columns:
username:
type: string(120)
fixed: true
unsigned: false
primary: false
default: ''
notnull: true
autoincrement: false
location:
type: string(80)
fixed: true
unsigned: false
primary: false
default: ''
notnull: true
autoincrement: false
abstract class BaseTblApprovalList extends sfDoctrineRecord
{
public function setTableDefinition()
{
$this->setTableName('tblApprovalList');
$this->hasColumn('username', 'string', 120, array(
'type' => 'string',
'fixed' => 1,
'unsigned' => false,
'primary' => false,
'default' => '',
'notnull' => true,
'autoincrement' => false,
'length' => '120',
));
$this->hasColumn('location', 'string', 80, array(
'type' => 'string',
'fixed' => 1,
'unsigned' => false,
'primary' => false,
'default' => '',
'notnull' => true,
'autoincrement' => false,
'length' => '80',
));
}
public function setUp()
{
parent::setUp();
}
}
So when I try:
$list = Doctrine::getTable('TblApprovalList')->createQuery('a')-
>execute();
I get:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.id' in
'field list'. Failing Query: "SELECT t.id AS t__id, t.username AS
t__username, t.location AS t__datacenter FROM tblApprovalList t"
--
You received this message because you are subscribed to the Google Groups
"symfony users" 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-users?hl=en.