Cake has no explicit support for database views, although they usually
work fine for reads. However, one gotcha is that, when setting up
your views, you have to alias all the columns, otherwise MySQL will
report the original table names that the results are from, and the
field arrays will be
I know nothing about using MySQL views, but I've never found it a
problem to filter/sort on deep associations.
The trick is to use dynamic associations - a temporary `hasOne`
instead of a `hasMany`, so that cakephp performs a join and you can
then filter inline in the query.
For example, let's
Hi,
somebody could clarify what is the level of support of Cake 1.2 for
woriking with MySQL Views?
For example, I've a chain o associations of three or more levels.
If I want to filter the results by a field in the 3rd level or beyond
there is no easy way to do it, unless I use a Custom SQL