added docs for the usage of column aliases
This commit is contained in:
parent
07cbafe799
commit
b23a69c1b3
@ -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();
|
||||
?>
|
@ -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.
|
Loading…
x
Reference in New Issue
Block a user