Skip to content

Instantly share code, notes, and snippets.

View jwage's full-sized avatar
💭
I am still here.

Jonathan H. Wage jwage

💭
I am still here.
View GitHub Profile
find all Documents\User where username = 'jwage' and password = 'changeme'
Array
(
[className] => Documents\User
[type] => 1
[where] => Array
(
[username] => jwage
[password] => changeme
diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
index 23466a1..0498cc0 100644
--- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
+++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
@@ -266,19 +266,19 @@ class XmlExporter extends AbstractExporter
}
$cascade = array();
if ($associationMapping->isCascadeRemove) {
- $cascade[] = 'remove';
+ $cascade[] = 'cascade-remove';
diff --git a/lib/Doctrine/ODM/MongoDB/DocumentManager.php b/lib/Doctrine/ODM/MongoDB/DocumentManager.php
index 1b4fc2c..944d6e7 100644
--- a/lib/Doctrine/ODM/MongoDB/DocumentManager.php
+++ b/lib/Doctrine/ODM/MongoDB/DocumentManager.php
@@ -426,12 +426,11 @@ class DocumentManager
*
* @param string $documentName The document name to load.
* @param string $id The id the document to load.
- * @param boolean $isProxy
* @return object $document The loaded document.
<?php
$path = '/path/to/doctrine/mongodb-odm';
require_once $path.'/lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
use Doctrine\Common\ClassLoader,
Doctrine\Common\Annotations\AnnotationReader,
Doctrine\ODM\MongoDB\DocumentManager,
Doctrine\ODM\MongoDB\Configuration,
Doctrine\ODM\MongoDB\Mongo,
<?php
namespace Application\FrontendBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller;
use Symfony\Components\Form;
class MainController extends Controller
{
public function indexAction()
<form action="/symfony2-test/web/index_dev.php/" method="post"> <table>
<tr>
<td><label for="invoice_property1">Property1</label></td>
<td>
<input id="invoice_property1" name="invoice[property1]" value="" type="text" />
</td></tr>
<tr>
<td><label for="invoice_property2">Property2</label></td>
<td>
<input id="invoice_property2" name="invoice[property2]" value="" type="text" />
<?php
/** @Document */
class Article
{
/** @Id */
public $id;
/** @String */
public $title;
class LockMode
{
const NONE = 0;
const OPTIMISTIC = 1;
const PESSIMISTIC_READ = 2;
const PESSIMISTIC_WRITE = 4;
final private function __construct() { }
}
<?php
/** @Document @HasLifecycleCallbacks */
class Product
{
/** @Id */
public $id;
/** @String */
public $name;
FROM: Harvey Ball <me@harveyball.com>
-------------------------------------
Hi,
Why does doctrine piss memory up the wall like a drunken slag on a saturday night?
I built a basic test such as....
Sku table