Re: Multi-table or Single-table Inheritance

2006-07-17 Thread [EMAIL PROTECTED]
Cake doesn't support the same functionality that the Rails ActiveRecord supports with the 'type' field. I think I'm just going to treat all of my people classes as separate objects, and tie them all to a UserAccount through a belongsTo/hasOne relationship. That way, everyone can authenticate on

Multi-table or Single-table Inheritance

2006-07-14 Thread [EMAIL PROTECTED]
I'm working on designing the database schema and model for an application that involves Administrators, SalesPeople, Designers, Customers, etc. They all share common attributes such as firstname, lastname, email, phone, password, etc. Traditionally, I've had a People table with the shared

Re: Multi-table or Single-table Inheritance

2006-07-14 Thread nate
From a high-level design perspective, implementing something like this in Cake would be about the same as in Ruby on Rails. As far as table/class design, you could have a Person class which extends Model, and is extended by SalesPerson, Designer etc. (allowing the use of shared logic). To your