-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
(don't know, if this is only DoctrineMongoDBBundle-related)
I've a Document like this:
/**
* @ODM\Document(collection="group")
*/
class Group
{
/**
* @ODM\String
*/
protected $type;
/**
* @param String
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return String
*/
public function getType()
{
return $this->type;
}
}
And will add a Form, with two document Field Types, where field1:
type=='Terminal'
and field2:
type=='Location'
So my Form looks like this:
$builder->add('terminalGroup', 'document', array('required' => false, 'class' => 'test\TestBundle\Document\Group', 'query_builder' => function(DocumentRepository $dm) { return $dm->createQueryBuilder('')->field('type')->equals('Terminal');}));
$builder->add('locationGroup', 'document', array('required' => false, 'class' => 'test\TestBundle\Document\Group', 'query_builder' => function(DocumentRepository $dm) { return $dm->createQueryBuilder('')->field('type')->equals('Location');}));
Form-Field terminalGroup and locationGroup display the same Documents (any document, which holds type = 'Terminal').
I recognized the issue first today, don't know if this is related on PR #4881