Cake ORM

2016-10-19 01:41:13
PHP Data Access Libraries (ORM, ActiveRecord, Persistence)
Cake ORM
Site web
Github / Bitbucket / Sourceforge
Dernière version
How schema is defined?
Code generation
Can be used in Any Framework
Automated Cache
Anti-patterns (purposely included)
Simplicité0 aucune note
Enterprise Compliance0 aucune note
Minimum PHP Version
Basic Features
PDO Support
NoSQL Integrate Transparently
Vendor-specific features
Array as a persistence
RestAPI as a persistence
JSON string as a persistence
Same model, multiple persistences
Persistence Mapping (must support C,R,U,D)
Table Name Mapping
Field Name Mapping
Map Entity to SubQuery
Map property to expression
Map native types (DateTime)
User-defined types (e.g. "23 USD")
Map field of related Entity ('currency' = currency_id->Model
Map field to sub-query on related entity (Client.balance = Client->orders->sum(total))
Entity to join multiple tables (adding new record populates both tables)
NoSQL (must be transparent to domain logic)
MongoDB support
Criteria, Scope, Conditions (Model will refuse to work with records that does not match criteria)
Domain Model Criteria
Expression-based condition
Criteria Compliance (new record must match condition)
Dynamic conditions
Query Building (Convert Model into Query object for further SQL tweaking)
Convert Model into Query Object
Raw expression
Nested/Composite Queries/Expressions
Reference domain-model field in query
field, where, order, limit
options, rollup, partition
UPDATE, DELETE, INSERT query building
ALTER, CREATE query building
User-defined query template
OR deep nested conditions
Use Domain logic in multi-record update
Data Fetching (different ways to retrieve data from database)
Get All Data (2x array)
Associative Array (id=>value)
Single row
Single Value
Single Column
Bypass persistence mapping
Loading and Saving individual records
Load by ID
Load by other field
Load if expression
Load respects Scope
Specify fields to load
Save only sends dirty fields
Guarded / Fillable properties
Object Hierarchy Model
Admin extends User (is_admin=1)
ShippedOrder extends Order
Extend model, add Join (Disjoined SubTypes)
Extend model change table
Relations/References (One model can relate to another model. NOT A TABLE JOIN)
Model can define relation to other Model
One-to-many traversal strategy
Deep Many-to-Many traversal.
Cross-Persistence traversal
Multi-persistence Mapping (some data from SQL, others MongoDB)
Multi-persistence join
UNION existing models
Multi-persistence UNION
Multi-persistence value linking (current_sensor_value)
Behaviours / Hooks
Before/After operation
Hooks for C,R,U,D operations
Persistence-specific hooks (to modify Query)
User-defined hooks
Mapping strategy
How to set-up
Store old/new field values
Date of creation, modification
User/IP creation, modification
Store incremental revisions
Revert action (undo)
Custom events
Custom fields, table
Store in CSV
Access to record-specific history
Access Control
Implementation Strategy
Single-system global access scope
Meta-information (allows exploration by UI widgets)
Implementation Strategy
UI Widget can fetch list of Model Fields
UI Widget can get Field type, default value, caption, hint
field storing reference to another Model can map into DropDown
  • 2016-10-18 22:11:55
    2016-10-19 01:41:13
  • Produits
  • Publique
  • Creative Commons License CC-BY-SA 3.0 / GNU FDL

Créer des tableaux comparatifs ou listes sur tout !

C'est gratuit et rapide de créer des tableaux originaux

Créer un tableau