symfony 2.5 - How to use single inheritance in propel schema -
symfony 2.5 - How to use single inheritance in propel schema -
i need create 'event' class , propel schema columns:
id employee_id date_start date_end type how implement simple inheritance based on type column.
all classes should extend abstract event class.
initial sub-class: joinevent
can write schema it?
i have written schema not sure whether right or not.
<table name="event" phpname="event"> <column name="id" type="integer" required="true" primarykey="true" autoincrement="true" /> <column name="employee_id" type="integer" required="true" /> <column name="date_start" type="date" required="true" /> <column name="date_end" type="date" required="false" /> <column name="type" type="integer" inheritance="single"> <inheritance key="1" class="joinevent" extends="event"/> </column> <foreign-key foreigntable="employee" name="fi_event_employee"> <reference local="employee_id" foreign="id" /> </foreign-key> </table> please help me.
propel symfony-2.5
Comments
Post a Comment