Models Models

Extending of DboSource and Model with sql generator function.

By Yevgeny Tomenko
Some times in SQL is very usefull and efficiency to use query from query using IN function. Some project require it. But Cakephp does not generate such queries and we need to create such requests to DB by hand.
[Read more]

Obvious trick to reduce amount of HABTM relationship tables

By Sergey Egorov
Trick howto reduce amount of HABTM tables in complex application
[Read more]

LDAP datasource for cakePHP

By euphrate
This article presents a simple LDAP datasource which can be used with the cake framework (both 1.1.x and 1.2.x). With this datasource, a cake web application should be able to interact with a LDAP 'database' (such as openldap or Microsoft Active Directory) just as if it was a Sql-like database.
[Read more]

Rails-like Data Validation

cURL Model

By James Hall
This is a wrapper for cURL. Ideal if you need to grab data from another site or integrate into a system that uses GET or POST requests.
[Read more]

dAuth v0.3 models

By Dieter Plaetinck
User, Host, LoginAttempt models for dAuth v0.3
[Read more]

Using LDAP as a database

By Bill Hunt
John Anderson wrote an article about building a model around LDAP. This snippit is an extension, implementing a much more full-featured LDAP model
[Read more]

Alternative Methods for Working with hasAndBelongsToMany Associations

By John Hanauer
As of 1.1.12.4205, CakePHP's current functionality for working with HABTM associations works very well for most applications, particularly those that lend themselves well to using multiple-selectTags or checkboxes. This article looks at proposed methods for adding or removing join records between two models that don't rely on bulky arrays and that minimize the amount of SQL executed on the database.
[Read more]