2 thoughts:
#1:
- I have just been debugging some wierd database view behavior in my
cake app and found that the underlying mysql_fetch_field() function
call that cake uses to determine the table that a field belongs to does
not seem know know about views.  That is where those strange model
names in your arrays are coming from.

So it appears to be a PHP/MySQL limitation - not a CakePHP problem.

But I will have to try out your CONCAT() trick and see if that makes it
behave.

----
#2:
Unless I am missing something, the disadvantage to using the
ActiveRecord pattern (cakePHP flavor or Rails) is that it can generate
a LOT of queries and trips to the database.

So if I have a 3 table hierarchy (group->person->family) and I am doing
a query for 10 groups with 100 people each, would that turn into 2000
queries! (or is cake smart enough to join them all? - I'm about to find
out I think)

But if I use a view to combine person and family, then I am reducing
that by 100% to 1000 queries and letting the database optimize the
person->family join - and aggregate some field for me at the same time.

Steve T.

On Dec 1, 11:48 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> I agree, views are not needed. Anything that can be done with views can be
> done without them. BUT, some people may find that they organize your code
> better. I think Cake shouldn't go out of its way to include native view
> support now, but should be considering that in the future they may need to
> be added.
>
> However I still don't know to what degree views are standard on other major
> DB engines (MSSQL, Oracle, Postgress, ...)
>
> PS: If RoR doesn't support them, so what? Cake might. Remember Cake is a PHP
> framework INSPIRED by RoR, it is not a RoR port for PHP ;)
>
> -MI
>
> ---------------------------------------------------------------------------
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> -----Mensaje original-----
> De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
> de Chris Hartjes
> Enviado el: Viernes, 01 de Diciembre de 2006 01:39 p.m.
> Para: [email protected]
> Asunto: Re: Cake is breaking database views. This looks like a bug.
>
> I think it's obvious that your expectation of how CakePHP should
> handle views does not match the currently reality of how CakePHP
> handles views.  Somehow I don't think they had views in mind when they
> built the Model class.


--~--~---------~--~----~------------~-------~--~----~
 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