[eluser]mscott809[/eluser]
My database model has the same core fields on every data table, like created_at and updated_at, which I see are supported, but also other fields like "inactive" and "last_mod_by", as well as a common to-many relationship (notes that can be attached to any other object). I would like to implement an intermediate class to handle the maintenance of these fields and related notes, but this intermediate class is not representing any one table by itself, just common goo for most of my tables. For instance, I'd like to do something like this:
Code:
class MyBaseModel extends DataMapper { ... }
class User extends MyBaseModel { ... }
But MyCommonModel doesn't represent a table in the database, just common columns and behaviors I want all objects to have.
Can I do this? If it just means having to manually set $model and $table on every sub class and dynamically update the $has_many array to insert the "notes" relationship, that would be well worth the ability to consolidate this common code. But I fear it's not that easy.
Thanks.