1
0
mirror of synced 2025-01-17 22:11:41 +03:00

added docs for the usage of column aliases

This commit is contained in:
zYne 2007-01-25 13:37:53 +00:00
parent 07cbafe799
commit b23a69c1b3
5 changed files with 14 additions and 0 deletions

View File

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

View File

@ -0,0 +1,2 @@
Doctrine offers a way of setting column aliases. This can be very useful when you want to keep the application logic separate from the
database logic. For example if you want to change the name of the database field all you need to change at your application is the column definition.