Good day.
I was hoping some of the Phalcon pro's could offer some adice or perhaps even point to some existing public examples of implementing a TPT (Table per Type) data structure in the ORM.
Just to clarify my terminology, what I actually mean is that I have base entities as tables, and specialisations of those entities providing just the additional fields as seperate tables. So for example.
I have an Item table which contains general item data, but I also have Event which is a specialisation of Item adding event dates.
DB : Item [price, title, quantity, description] <- Event [startdate, capacity]
So event has a dependency on the Item table and all events would have a 1 to 1 relationship with Item, but there are also other "Types of Item".
In the backend, this should likely be implimented as :
Class Event extends Item { //do something so that CRUD and any critical ORM functionality works
So my question, has anyone implemtned anything like this in Phalcon? Any pointers?
Many thanks
I am on Phalcon 1.3.4