I would really challenge the concept of active record not being suited for
some app necessities, but that's a subject for another thread.

You can *still* make your model extend AppModel but use your own fully
featured SQL queries as model functions and still take advantage of CakePHP
database connection methods.

Other low-level option is to just use the classes AppModel uses for database
connectivity (take a look at cake/libs/model/*)

-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 Veloz
Enviado el: Martes, 02 de Enero de 2007 06:23 p.m.
Para: Cake PHP
Asunto: "direct" data access?


I'm pretty new to Cake and have this question: is it possible to use
Cake's lower level database classes in the case that you do not descend
your model from AppModel?

In other words, if you want to create a model class that does not
descend from AppModel, but still needs some database access support,
can you somehow use classes like DataSource and/or DboMysql?

Does anyone know how to go about setting these up?

I think we are going to have some database access needs that may not be
easy to express using Cake's ActiveRecord, so we are trying to figure
out how to still have our models access the database using Cake classes
instead of interjecting our own connection managment code, etc.

TIA!
Michael



__________ Información de NOD32, revisión 1953 (20070102) __________

Este mensaje ha sido analizado con  NOD32 antivirus system
http://www.nod32.com



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