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
757a9529
Commit
757a9529
authored
Mar 10, 2010
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixed issue with Proxy classes that was silently failing to load correspondent Entity.
parent
273bc3dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
EntityNotFoundException.php
lib/Doctrine/ORM/EntityNotFoundException.php
+17
-0
ProxyFactory.php
lib/Doctrine/ORM/Proxy/ProxyFactory.php
+3
-1
No files found.
lib/Doctrine/ORM/EntityNotFoundException.php
0 → 100644
View file @
757a9529
<?php
namespace
Doctrine\ORM
;
/**
* Exception thrown when a Proxy fails to retrieve an Entity result.
*
* @author robo
* @since 2.0
*/
class
EntityNotFoundException
extends
ORMException
{
public
function
__construct
()
{
parent
::
__construct
(
'Entity was found although one item was expected.'
);
}
}
\ No newline at end of file
lib/Doctrine/ORM/Proxy/ProxyFactory.php
View file @
757a9529
...
@@ -257,7 +257,9 @@ namespace <namespace> {
...
@@ -257,7 +257,9 @@ namespace <namespace> {
private function _load() {
private function _load() {
if (!$this->__isInitialized__ && $this->_entityPersister) {
if (!$this->__isInitialized__ && $this->_entityPersister) {
$this->__isInitialized__ = true;
$this->__isInitialized__ = true;
$this->_entityPersister->load($this->_identifier, $this);
if ($this->_entityPersister->load($this->_identifier, $this) === null) {
throw new \Doctrine\ORM\EntityNotFoundException();
}
unset($this->_entityPersister);
unset($this->_entityPersister);
unset($this->_identifier);
unset($this->_identifier);
}
}
...
...
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