Database Access & ORM
In CakePHP working with data through the database is done with two primary object types. The first are repositories or table objects. These objects provide access to collections of data. They allow you to save new records, modify/delete existing ones, define relations, and perform bulk operations. The second type of objects are entities. Entities represent individual records and allow you to define row/record level behavior & functionality.
These two classes are usually responsible for managing almost everything that happens regarding your data, its validity, interactions and evolution of the information workflow in your domain of work.
CakePHP’s built-in ORM specializes in relational databases, but can be extended to support alternative datasources.
The CakePHP ORM borrows ideas and concepts from both ActiveRecord and Datamapper patterns. It aims to create a hybrid implementation that combines aspects of both patterns to create a fast, simple to use ORM.
Before we get started exploring the ORM, make sure you configure your database connections.
If you are familiar with previous versions of CakePHP, you should read the New ORM Upgrade Guide for important differences between CakePHP 3.0 and older versions of CakePHP.
Download
0 formats
No download links available.
CakePHP 3.4 tutorial for beginners step by step - 2.5 - Migrations, CRUD, Database with CakePHP | NatokHD