2017 © Pedro Peláez
 

library doctrine-magic-embed-bundle

A Symfony2 bundle to support embedding a version of a first-class managed document

image

cygnus/doctrine-magic-embed-bundle

A Symfony2 bundle to support embedding a version of a first-class managed document

  • Thursday, February 27, 2014
  • by zarathustra323
  • Repository
  • 8 Watchers
  • 2 Stars
  • 3 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Doctrine Magic Embed

This bundle supports embedding a version of a first-class managed document in Doctrine documents., (*1)

Build Status, (*2)


The Problem

In Doctrine, managed documents cannot be easily embedded within other documents. In a blogging scenario, it would be useful to embed the post author on each Post document, both to prevent unnecessary database lookups and to easily access methods or properties of the author, once hydrated., (*3)

In Doctrine, you would need to either reference the Author document (causing a DB query), or embed an EmbeddedDocument version of the Author document (to which changes would not be persisted.) You may also want to specify what fields of the embedded document are actually embedded, which is not currently supported., (*4)


The Solution

This bundle attempts to remedy that problem by providing three things:, (*5)

  1. An annotation driver to define which fields should be used when embedding a document.
  2. A service that hooks into Doctrine's hydration and persistance events to transform the passed document into a true embedded document based on the fields you have defined with the annotation driver.
  3. Finally, a service that hooks into Doctrine's persistance functionality to cascade changes from managed documents to transformed embedded documents.

Status

This bundle is currently under active development, and no stable release is yet available. If you're interested in learning more or contributing, feel free to check out the documentation or the wiki., (*6)

The Versions

27/02 2014

dev-master

9999999-dev

A Symfony2 bundle to support embedding a version of a first-class managed document

  Sources   Download

MIT

The Requires

 

by Jacob Bare
by Josh Worden