1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/codes/Object relational mapping - Columns - Column aliases.php

13 lines
233 B
PHP
Raw Normal View History

<?php
class Book extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('bookName as name', 'string');
}
}
$book = new Book();
$book->name = 'Some book';
$book->save();
?>