1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/docs/Mapping object relations - Inheritance - Column aggregation.php
2006-07-23 21:08:06 +00:00

9 lines
478 B
PHP

In the following example we have one database table called 'entity'.
Users and groups are both entities and they share the same database table.
<br \><br \>
The entity table has a column called 'type' which tells whether an entity is a group or a user.
Then we decide that users are type 1 and groups type 2.
The only thing we have to do is to create 3 records (the same as before) and add
call the Doctrine_Table::setInheritanceMap() method inside the setUp() method.