Skip to content
Browse files

fixed handling of node type in createQuery()

  • Loading branch information...
1 parent f8aced3 commit db0a457f1cfe6afd747befe2ceeb0d1d3cc1d3d9 @lsmith77 lsmith77 committed Sep 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Doctrine/ODM/PHPCR/DocumentRepository.php
View
2 lib/Doctrine/ODM/PHPCR/DocumentRepository.php
@@ -249,7 +249,7 @@ public function createQuery($statement, $type, $options = 0)
$statement = str_replace('SELECT *', 'SELECT '.implode(', ', $this->class->getFieldNames()), $statement);
}
- $aliasFilter = '[nt:unstructured].[phpcr:class] = '.$this->quote($this->documentName);
+ $aliasFilter = $this->class->nodeType.'.[phpcr:class] = '.$this->quote($this->documentName);
if (false !== strpos($statement, 'WHERE')) {
$statement = str_replace('WHERE', "WHERE $aliasFilter AND ", $statement);
} elseif (false !== strpos($statement, 'ORDER BY')) {

0 comments on commit db0a457

Please sign in to comment.
Something went wrong with that request. Please try again.