doctrine-json-odm | object document mapper for Doctrine ORM | JSON Processing library
kandi X-RAY | doctrine-json-odm Summary
kandi X-RAY | doctrine-json-odm Summary
An Object-Document Mapper (ODM) for Doctrine ORM leveraging new JSON types of modern RDBMS. Did you ever dream of a tool creating powerful data models mixing traditional, efficient relational mappings with modern schema-less and NoSQL-like ones?. With Doctrine JSON ODM, it's now possible to create and query such hybrid data models with ease. Thanks to modern JSON types of RDBMS, querying schema-less documents is easy, powerful and fast as hell (similar in performance to a MongoDB database)! You can even define indexes for those documents. Doctrine JSON ODM allows to store PHP objects as JSON documents in modern, dynamic columns of an RDBMS. It works with JSON and JSONB columns of PostgreSQL (>= 9.4) and the JSON column type of MySQL (>= 5.7.8). For more information about concepts behind Doctrine JSON ODM, take a look at the presentation given by Benjamin Eberlei at Symfony Catalunya 2016.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Denormalizes data .
- Prepend framework configuration .
- Normalize data .
- Returns the serializer .
- Converts a value to a serialized database value .
- Converts a PHP value to a PHP value .
- Boot the class
- Load services .
doctrine-json-odm Key Features
doctrine-json-odm Examples and Code Snippets
Community Discussions
Trending Discussions on doctrine-json-odm
QUESTION
I'm trying to inject an Entity via DI into a service.
The Entity is created from a JSON-Field in the database (which got queried from the user-request) via the Doctrine-JSON-ODM-library (https://github.com/dunglas/doctrine-json-odm).
I would generally write a Context-class, which would take Request & Repository to return the Dependency( as described here https://blogs.cuttingedge.it/steven/posts/2015/code-smell-injecting-runtime-data-into-components/ ). However since my dependencies rely on deeply nested data inside a tree-structure, this does not seem feasible.
...ANSWER
Answered 2019-Sep-01 at 15:28Adding to my comment on original post, once you pass the entity as method argument, you can set it as class variable, i.e.:
$service->method($entity)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install doctrine-json-odm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page