1
0
mirror of synced 2024-12-16 16:16:04 +03:00
doctrine2/manual/docs/Object relational mapping - Relations - Inheritance - Column aggregation.php
2007-02-23 23:02:59 +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.