Overriding findBy{Field}

2009-02-25 Thread psujohn
So for some reason we want to handle Canada differently from the US. We have a model that has a zip and for US we do stuff like ->findByZip ('20007') but for Canada we want to put partial postal codes in the db and have ->findByZip('N1M 1M2') match an entry in the db that has just 'N1M' listed as

Ordering related table

2008-12-30 Thread psujohn
Probably a really simple thing that I'm just missing: User hasMany Registration Registration belongsTo Event Now I want to display all the events that a user has registered for which is pretty simple: $this->User->find("User.id=$id", null, null, 2) So in the view I can iterate over the user's r