Skip to content

Commit

Permalink
Execute query as normal from inside single query
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Feb 24, 2012
1 parent 45810f8 commit 87452af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions NotORM/Result.php
Expand Up @@ -715,6 +715,7 @@ function offsetExists($key) {
function offsetGet($key) {
if ($this->single && !isset($this->data)) {
$clone = clone $this;
$clone->single = false; // execute as normal query
if (is_array($key)) {
$clone->where($key)->limit(1);
} else {
Expand Down

0 comments on commit 87452af

Please sign in to comment.