Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove obsolete method, added a todo

  • Loading branch information...
commit 354461d16b5d214acfcd19fe61fd78d7cc359e76 1 parent f7c1caf
@dbu dbu authored
Showing with 10 additions and 12 deletions.
  1. +7 −0 CHANGELOG.md
  2. +3 −12 lib/Doctrine/ODM/PHPCR/DocumentRepository.php
View
7 CHANGELOG.md
@@ -1,6 +1,13 @@
Changelog
=========
+2013-01-18
+----------
+
+ * Removed DocumentRepository->getDocumentsByQuery as it is no longer needed.
+ createQuery returns you an ODM query that can find documents directly.
+ To get documents from a PHPCR query there is DocumentManager->getDocumentsByPhpcrQuery()
+
2013-01-13
----------
View
15 lib/Doctrine/ODM/PHPCR/DocumentRepository.php
@@ -240,10 +240,12 @@ public function escapeFullText($string)
* @param string $statement the SQL2 statement
* @param string $language (see QueryInterface for list of supported types)
* @param bool $replaceWithFieldnames if * should be replaced with Fieldnames automatically
- * @return PHPCR\Query\QueryResultInterface
+ *
+ * @return Query
*/
public function createQuery($statement, $language, $options = 0)
{
+ // TODO: refactor this to use the odm query builder
@dbu Collaborator
dbu added a note

@dantleech if you could do this, would be awesome!

@dantleech Collaborator

Yeah, I think this is one of those things that we will get for free if we carry on evolving the ODM. e.g. if we implement DQL, that would be accepted here and this use case would be pushed down to the PHPCR level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
$qb = $this->dm->createPhpcrQueryBuilder()->setFromQuery($statement, $language);
if ($options & self::QUERY_REPLACE_WITH_FIELDNAMES) {
$columns = $qb->getColumns();
@@ -270,17 +272,6 @@ public function createQuery($statement, $language, $options = 0)
}
/**
- * Get documents from a PHPCR query instance
- *
- * @param \PHPCR\Query\QueryResultInterface $result
- * @return array of document instances
- */
- public function getDocumentsByQuery(\PHPCR\Query\QueryInterface $query)
- {
- return $this->dm->getDocumentsByQuery($query, $this->className);
- }
-
- /**
* Create a QueryBuilder that is prepopulated for this repositories document
*
* The returned query builder will be prepopulated with the criteria
Please sign in to comment.
Something went wrong with that request. Please try again.