Site web | https://spiral-framework.com/guide |
---|
Github / Bitbucket / Sourceforge | https://github.com/spiral/orm |
---|
Licence | MIT |
---|
Dernière version | 1.0.8 |
---|
How schema is defined? | PHP Const array. Column class. |
---|
Code generation | |
---|
Can be used in Any Framework | |
---|
Automated Cache | |
---|
Anti-patterns (purposely included) | |
---|
Audience | |
---|
Dependencies | |
---|
Simplicité | 0 aucune note |
---|
Enterprise Compliance | 0 aucune note |
---|
Minimum PHP Version | |
---|
Basic Features | |
---|
PDO Support | Oui https://spiral-framework.com/guide/database-databases |
---|
Transparent support for NoSQL | Non No, through ODM (https://spiral-framework.com/guide/odm-databases) |
---|
How to invoke db-vendor-specific extensions? | Oui Query models: https://spiral-framework.com/guide/orm-query |
---|
Array as a persistence | Non |
---|
RestAPI as a persistence | Non |
---|
JSON string as a persistence | Non |
---|
Same model, multiple persistences | |
---|
Basic Single-record operations (C,R,U,D) | |
---|
Table Name Mapping | |
---|
Field Name Mapping | |
---|
Map Entity to SubQuery | |
---|
Map property to expression | |
---|
Map native types (DateTime) | - No support for DateTime. https://spiral-framework.com/guide/orm-accessors |
---|
User-defined types (e.g. "23 USD") | |
---|
Map field of related Entity ('currency' = currency_id->Model Currency.name) | |
---|
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) | |
---|
Criteria, Scope, Conditions (Model will refuse to work with records that does not match criteria) | |
---|
Support model-level criteria | |
---|
Soft-delete | |
---|
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 | Oui RecordSelector |
---|
Raw expression | |
---|
Nested/Composite Queries/Expressions | |
---|
Reference domain-model field in query | |
---|
field, where, order, limit | |
---|
options, rollup, partition | |
---|
UPDATE, DELETE, INSERT query building | |
---|
REPLACE, TRUNCATE | |
---|
SHOW, DESCRIBE, CALL | |
---|
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 | |
---|
Iterator | |
---|
Bypass persistence mapping | |
---|
Loading and Saving individual records | |
---|
Load by ID | Oui findByPK |
---|
Load by other field | |
---|
Read-only Models | |
---|
Model without primary key | |
---|
Specify fields to load | |
---|
Save only sends dirty fields | Oui |
---|
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 | |
---|
One-to-many traversal strategy | |
---|
Lazy/Eager-loading | |
---|
One-to-One | |
---|
Many-to-Many | |
---|
Deep Many-to-Many traversal. | |
---|
Cross-Persistence traversal | |
---|
Cross-persistence joins, aggregation, reporting | |
---|
Multi-persistence join | |
---|
UNION existing models | |
---|
Domain-model Aggregation | |
---|
Model to Model join | |
---|
Multi-persistence UNION | |
---|
Behaviours / Hooks | |
---|
Before/After operation | |
---|
Override standard C,R,U,D operations | |
---|
Persistence-specific hooks (to modify Query) | |
---|
User-defined hooks | |
---|
Auditing | |
---|
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 | Oui TimestampTrait |
---|
User/IP creation, modification | |
---|
Store incremental revisions | |
---|
Integration | |
---|
Field meta-information provided | |
---|
UI extensions | |
---|
API extensions | |
---|
J'aime | 0 J'aime |
---|
Plus de comparatifs
Commentaires
Pas de commentaires pour l'instant. Soyez le premier à donner votre avis.Laisser un commentaire
S'inscrire Se connecter