Skip to content

Commit

Permalink
Set the class name if not already set
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Feb 14, 2015
1 parent 1eca423 commit 3571fdc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ORM/Association.php
Expand Up @@ -199,8 +199,13 @@ public function __construct($alias, array $options = [])
}
}

if(!$this->_className) {
$this->_className = $alias;
}

list(,$name) = pluginSplit($alias);
$this->_name = $name;

$this->_options($options);

if (!empty($options['strategy'])) {
Expand Down

0 comments on commit 3571fdc

Please sign in to comment.