Commit 97f20c23 authored by David Girón's avatar David Girón Committed by Alexander Butenko

FIX #626: dbObject not finding relations (#667)

parent 8afa9465
......@@ -383,7 +383,7 @@ class dbObject {
* @return dbObject
*/
private function with ($objectName) {
if (!property_exists ($this, 'relations') && !isset ($this->relations[$name]))
if (!property_exists ($this, 'relations') || !isset ($this->relations[$objectName]))
die ("No relation with name $objectName found");
$this->_with[$objectName] = $this->relations[$objectName];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment