浏览代码

[sluggable] fix identifier expresion, closes #334

gedi 13 年之前
父节点
当前提交
b5f4b3e3b3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/Gedmo/Sluggable/Mapping/Event/Adapter/ORM.php

+ 1 - 1
lib/Gedmo/Sluggable/Mapping/Event/Adapter/ORM.php

@@ -36,7 +36,7 @@ final class ORM extends BaseAdapterORM implements SluggableAdapter
         ;
         // include identifiers
         foreach ((array)$wrapped->getIdentifier(false) as $id => $value) {
-            if (strlen($value) && !$meta->isIdentifier($config['slug'])) {
+            if (!$meta->isIdentifier($config['slug'])) {
                 $qb->andWhere($qb->expr()->neq('rec.' . $id, ':' . $id));
                 $qb->setParameter($id, $value);
             }