Skip to content

Commit 064e253

Browse files
duhowricwein
authored andcommitted
FIX ThingEngineer#626: dbObject not finding relations (ThingEngineer#667)
1 parent 4e5e9dd commit 064e253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dbObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ protected function get ($limit = null, $fields = null) {
383383
* @return dbObject
384384
*/
385385
private function with ($objectName) {
386-
if (!property_exists ($this, 'relations') && !isset ($this->relations[$name]))
386+
if (!property_exists ($this, 'relations') || !isset ($this->relations[$objectName]))
387387
die ("No relation with name $objectName found");
388388

389389
$this->_with[$objectName] = $this->relations[$objectName];

0 commit comments

Comments
 (0)