2017-12-20 18:38:13
PHP Data Access Libraries (ORM, ActiveRecord, Persistence)
Site web
Github / Bitbucket / Sourceforge
Dernière version2.5.5
How schema is defined?PHP, XML, YAML
Code generationOui schema-tool
Can be used in Any FrameworkOui composer / packagist
Automated Cache
Anti-patterns (purposely included)
DependenciesMedium: ±5 packages.
Simplicité0 aucune note
Enterprise Compliance5.0 1 note
Minimum PHP Version5.4
Basic Features
PDO SupportOui Yes
Transparent support for NoSQL
How to invoke db-vendor-specific extensions?Oui DBAL
Array as a persistence
RestAPI as a persistence
JSON string as a persistence
Same model, multiple persistences
Basic Single-record operations (C,R,U,D)
Table Name MappingOui Yes
Field Name MappingOui Yes, (Annotations in PHP)
Map Entity to SubQueryNon Must be physical table
Map property to expressionNon Must be physical field
Map native types (DateTime)
User-defined types (e.g. "23 USD")Oui Type class
Map field of related Entity ('currency' = currency_id->Model Specific record only
Map field to sub-query on related entity (Client.balance = Client->orders->sum(total))Non
Entity to join multiple tables (adding new record populates both tables)Oui Associations
Criteria, Scope, Conditions (Model will refuse to work with records that does not match criteria)
Support model-level criteria
Soft-deleteOui Extension
Domain Model Criteria
Expression-based condition
Criteria Compliance (new record must match condition)
Dynamic criteria
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
full support for OR 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)
Select only required fields
Typecasting (e.g. DateTime)
Import (multiple records)
Respect domain model mapping (and criteria)
Single row
Single Value
Single Column
Bypass persistence mapping
Loading and Saving individual records
Load by ID
Load by other field
Read-only Models
Model without primary key
Specify fields to load
Save only sends dirty fields
Guarded / Fillable properties
Object Hierarchy Model
Admin extends User, adds criteria (is_admin=1)
Admin extends User, adds accessible fields
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.Non
Cross-Persistence traversal
Cross-persistence joins, aggregation, reporting
Multi-persistence joinNon
UNION existing modelsNon
Domain-model Aggregation
Model to Model join
Multi-persistence UNIONNon
Behaviours / Hooks
Before/After operation
Override standard C,R,U,D operations
Persistence-specific hooks (to modify Query)
User-defined hooks
Global Auditing
Store old/new field values
Revert action (undo) and replay (redo)
Reactive actions
Store log in any persistence
Override, Add fields to audit log
Custom events
Access to record-specific history
Date of creation, modification
User/IP creation, modification
Store incremental revisions
Field meta-information provided
UI extensionsNon
API extensions
J'aime 0
  • 2016-10-18 22:11:55
    2017-12-20 18:38:13
  • Produits
  • Publique
  • Creative Commons License CC-BY-SA 3.0 / GNU FDL