Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #11 from odino/master

New article for the OrientDB ODM
  • Loading branch information...
commit c799e6624d8e23c34de47546a0a0e334821c1ef9 2 parents 93b5684 + d74bdb5
@jwage jwage authored
Showing with 86 additions and 0 deletions.
  1. +86 −0 pages/source/blog/doctrine-orientdb-odm.rst
86 pages/source/blog/doctrine-orientdb-odm.rst
@@ -0,0 +1,86 @@
+:author: odino <>
+:date: 2012-12-28 11:59:00
+Doctrine OrientDB Object Document Mapper
+"2012 is the year of graph databases" was the
+sentence that a lot of people were hearing at the
+end of 2011, especially after the explosion of
+Big Data associated with social networks.
+At the beginning of this year, a really promising
+GraphDB, `OrientDB <>`,
+saw its first stable release (1.0.0) which finally
+gave to the world a stable toy pretty different
+from the traditional RDBMS that we're used to see
+and from the document-based DBs like MongoDB or
+CouchDB: OrientDB integrates document capabilities
+with a graph layer, thus it sounded very, very
+Even before going stable, there were some companies
+already using OrientDB, thanks to the language-specific
+drivers created by the community surrounding this GraphDB:
+one of them, for PHP, was `Orient <>`,
+a bunch of classes that wrapped PHP's native cURL functions
+to make queries against OrientDB's via the HTTP protocol.
+Day after day, the guys behind Orient, this PHP library,
+decided to add - mostly inspired by the doctrine 1 query
+builder and the Doctrine2 ODMs - abstraction and layers over
+that bunch of classes, finally having 3 different pieces of
+software to interact with OrientDB from PHP: the HTTP binding,
+which does HTTP calls to the OrientDB server, the Query Builder,
+which provides an object-oriented synthax to write SQL+
+(OrientDB's SQL) queries and the Data Mapper, which is still
+Trying to adhere to the Doctrine2 ODMs standards, the code looks
+pretty similar:
+ [php]
+ // invoking a repository
+ $userRepository = $manager->getRepository('My\Entity');
+ // creating SQL+ queries
+ $query = new Query();
+ $query->from(array('users'))->where('username = ?', "admin");
+ // mapping POPOs
+ namespace Domain;
+ use Doctrine\ODM\OrientDB\Mapper\Annotations as ODM;
+ /**
+ * @ODM\Document(class="Address")
+ */
+ class Address
+ {
+ /**
+ * @ODM\Property(type="string")
+ */
+ public $street;
+ }
+ // finding a record
+ $record = $manager->find($id);
+The work done so far was interesting enough to think about
+an OrientDB ODM inside the Doctrine organization, thing that
+eventually happened today when the old repository has been
+moved to the `doctrine organization <>`
+on Github.
+More news are going to come in the next weeks, as the target is to
+release a stable version of the OrientDB ODM this year: you can
+already `use it <>`
+or even `fork it <>` if you want
+to contribute or propose a patch.
+For further informations you can subscribe to the doctrine-dev
+google group or join the IRC channel #doctrine-dev on Freenode.
Please sign in to comment.
Something went wrong with that request. Please try again.