Hi all,

I'm a Cake newbie so please bear with me. How does one handle 
Effective Dating/Data Aging in Cake?  For example, consider the 
following scenario:

I am a sales agent at a company in which each sales agent is in charge 
if handling the sales within one or more territories.  I am currently 
assigned to two territories, but one week an associate of mine quits 
and I get assigned a third.

The way I see it, the data design for Cake might look like:

agents
---------
id
name

territories
-------------
id
name
agent_id

So, once I get assigned the third territory, it looks as though I've 
had that territory forever!  I may get credit for sales that occurred 
in my territory before I was assigned to it (which isn't so bad if I'm 
the sales agent, but if I'm the manager it would!)

In other applications I've seen a composite key (id,effective date) 
that allowed you to not only see changes occur but also match up 
historical data correctly.

Does anyone know how to do this in Cake?  It looks like the framework 
makes assumptions about the data structures that won't allow an 
effective date to be part of the key.

Any help is appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to