Object relational mapping - Columns - Data types - Object.php 338 Bytes
Newer Older
hansbrix's avatar
hansbrix committed
1 2
Doctrine supports objects as column types. Basically you can set an object to a field and Doctrine handles automatically the serialization / unserialization
of that object.
3

hansbrix's avatar
hansbrix committed
4 5 6 7 8 9 10
<code type="php">
class Test extends Doctrine_Record {
    public function setTableDefinition() {
        $this->hasColumn('objecttest', 'object');
    }
}
</code>