|
@@ -32,6 +32,8 @@ class ModelManager implements ModelManagerInterface
|
|
{
|
|
{
|
|
protected $registry;
|
|
protected $registry;
|
|
|
|
|
|
|
|
+ const ID_SEPARATOR = '~';
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @param \Symfony\Bridge\Doctrine\RegistryInterface $registry
|
|
* @param \Symfony\Bridge\Doctrine\RegistryInterface $registry
|
|
*/
|
|
*/
|
|
@@ -136,7 +138,7 @@ class ModelManager implements ModelManagerInterface
|
|
*/
|
|
*/
|
|
public function find($class, $id)
|
|
public function find($class, $id)
|
|
{
|
|
{
|
|
- $values = array_combine($this->getIdentifierFieldNames($class), explode('-', $id));
|
|
|
|
|
|
+ $values = array_combine($this->getIdentifierFieldNames($class), explode(self::ID_SEPARATOR, $id));
|
|
return $this->getEntityManager($class)->getRepository($class)->find($values);
|
|
return $this->getEntityManager($class)->getRepository($class)->find($values);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -268,7 +270,7 @@ class ModelManager implements ModelManagerInterface
|
|
|
|
|
|
$values = $this->getIdentifierValues($entity);
|
|
$values = $this->getIdentifierValues($entity);
|
|
|
|
|
|
- return implode('-', $values);
|
|
|
|
|
|
+ return implode(self::ID_SEPARATOR, $values);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -285,7 +287,7 @@ class ModelManager implements ModelManagerInterface
|
|
$prefix = uniqid();
|
|
$prefix = uniqid();
|
|
$sqls = array();
|
|
$sqls = array();
|
|
foreach ($idx as $pos => $id) {
|
|
foreach ($idx as $pos => $id) {
|
|
- $ids = explode('-', $id);
|
|
|
|
|
|
+ $ids = explode(self::ID_SEPARATOR, $id);
|
|
|
|
|
|
$ands = array();
|
|
$ands = array();
|
|
foreach ($fieldNames as $posName => $name) {
|
|
foreach ($fieldNames as $posName => $name) {
|