Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
b353dc51
Commit
b353dc51
authored
Oct 05, 2009
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Adding EntityRepository::createQueryBuilder() method
parent
02519233
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
EntityRepository.php
lib/Doctrine/ORM/EntityRepository.php
+14
-0
ClassMetadata.php
lib/Doctrine/ORM/Mapping/ClassMetadata.php
+1
-0
ClassMetadataInfo.php
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
+1
-0
No files found.
lib/Doctrine/ORM/EntityRepository.php
View file @
b353dc51
...
...
@@ -32,6 +32,7 @@ namespace Doctrine\ORM;
* @link www.doctrine-project.org
* @since 2.0
* @author Roman Borschel <roman@code-factory.org>
* @author Jonathan H. Wage <jonwage@gmail.com>
*/
class
EntityRepository
{
...
...
@@ -52,6 +53,19 @@ class EntityRepository
$this
->
_class
=
$class
;
}
/**
* Create a new QueryBuilder instance that is prepopulated for this entity name
*
* @param string $alias
* @return QueryBuilder $qb
*/
public
function
createQueryBuilder
(
$alias
)
{
return
$this
->
_em
->
createQueryBuilder
()
->
select
(
$alias
)
->
from
(
$this
->
_entityName
);
}
/**
* Clears the repository, causing all managed entities to become detached.
*/
...
...
lib/Doctrine/ORM/Mapping/ClassMetadata.php
View file @
b353dc51
...
...
@@ -38,6 +38,7 @@ use Doctrine\Common\DoctrineException;
* the serialized representation).
*
* @author Roman Borschel <roman@code-factory.org>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @since 2.0
*/
final
class
ClassMetadata
extends
ClassMetadataInfo
...
...
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
View file @
b353dc51
...
...
@@ -38,6 +38,7 @@ use Doctrine\Common\DoctrineException;
* the serialized representation).
*
* @author Roman Borschel <roman@code-factory.org>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @since 2.0
*/
class
ClassMetadataInfo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment