Eloquent
J'aime 0
| Nom | Eloquent | 
|---|---|
| Site web | |
| Github / Bitbucket / Sourceforge | |
| Licence | |
| Dernière version | |
| How schema is defined? | Model class properties | 
| Code generation | |
| Can be used in Any Framework | Oui Through Capsule | 
| Automated Cache | Oui | 
| Anti-patterns (purposely included) | Eloquent is a God Class; Global functions; DB Conection is global; | 
| Audience | |
| Dependencies | |
| Simplicité |  aucune note | 
| Enterprise Compliance | 3.0/5 1 note | 
| Minimum PHP Version | |
| Basic Features | |
| PDO Support | Oui | 
| Transparent support for NoSQL | Non Eloquent is built on Query Builder. Perhaps moloquent? Also - Through Caching backend, but not as ORM native persistence. | 
| How to invoke db-vendor-specific extensions? | Oui Through Query Builder / RAW queries. | 
| 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 Mapping | Oui Same as model class name by default | 
| Field Name Mapping | - Through accessors/3rd party extension | 
| Map Entity to SubQuery | Non Must be physical table. | 
| Map property to expression | Non Must be physical table | 
| Map native types (DateTime) | Oui Accessors and Mutators | 
| User-defined types (e.g. "23 USD") | Oui Accessors and Mutators | 
| Map field of related Entity ('currency' = currency_id->Model Currency.name) | - Relationship, but only single record. | 
| 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) | Non | 
| Criteria, Scope, Conditions (Model will refuse to work with records that does not match criteria) | |
| Support model-level criteria | - Global Scope (querying only) | 
| Soft-delete | Oui Trait and Scope | 
| Domain Model Criteria | - Scopes, but not in domain model. | 
| Expression-based condition | Oui through Query Builder | 
| 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 Model is a Query object. See: Model::where() | 
| Raw expression | Oui DB::raw() | 
| Nested/Composite Queries/Expressions | Non | 
| Reference domain-model field in query | Non No fields. Only properties. | 
| field, where, order, limit | Oui | 
| 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 | - Partial | 
| Use Domain logic in multi-record update | Non | 
| Data Fetching (different ways to retrieve data from database) | |
| Get All Data (2x array) | Oui | 
| Associative Array (id=>value) | Oui lists() | 
| Select only required fields | |
| Typecasting (e.g. DateTime) | |
| Import (multiple records) | |
| Respect domain model mapping (and criteria) | |
| Single row | Oui | 
| Single Value | Oui | 
| Single Column | Oui | 
| Iterator | Oui | 
| Bypass persistence mapping | Oui ?? (e..g prevent date from being transformed into Carbon) | 
| Loading and Saving individual records | |
| Load by ID | |
| Load by other field | |
| Read-only Models | |
| Model without primary key | |
| Specify fields to load | Non Fields load with SELECT * | 
| Save only sends dirty fields | Oui | 
| Guarded / Fillable properties | Oui Prevents "create($_GET)" from messing up important fields. | 
| Object Hierarchy Model | |
| Admin extends User, adds criteria (is_admin=1) | Non | 
| Admin extends User, adds accessible fields | Non | 
| Extend model, add Join (Disjoined SubTypes) | Non | 
| Extend model change table | |
| Relations/References (One model can relate to another model. NOT A TABLE JOIN) | |
| Model can define relation to other Model | Oui Relations | 
| One-to-Many | |
| One-to-many traversal strategy | Returns array of objects that may either be pre-loaded with record data or only contain IDs (lazy-loaded). | 
| Lazy/Eager-loading | Oui | 
| One-to-One | |
| Many-to-Many | |
| Deep Many-to-Many traversal. | |
| Cross-Persistence traversal | |
| Cross-persistence joins, aggregation, reporting | |
| Multi-persistence join | Non | 
| UNION existing models | Non | 
| Domain-model Aggregation | |
| Model to Model join | |
| Multi-persistence UNION | Non | 
| 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) | Non | 
| 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 | Oui | 
| Integration | |
| Field meta-information provided | |
| UI extensions | Non | 
| API extensions | 
Avis utilisateurs et commentaires