Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue where plugin name would get lost when rebinding a model.

  • Loading branch information...
commit 25009c439daaa84877192f22898ca4397d22e8c5 1 parent d71199c
@Phally authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 libs/lazy_model.php
View
9 libs/lazy_model.php
@@ -133,7 +133,14 @@ private function constructLazyLinkedModel($assoc, $className = null) {
*/
private function map($key, $properties) {
list($alias, $properties) = $return = $this->properties($key, $properties);
- $this->map[$alias] = $properties['className'];
+ if (isset($this->map[$alias])) {
+ list($plugin, $model) = $this->pluginSplit($this->map[$alias]);
+ if ($alias != $model) {
+ $this->map[$alias] = $properties['className'];
+ }
+ } else {
+ $this->map[$alias] = $properties['className'];
+ }
return $return;
}
Please sign in to comment.
Something went wrong with that request. Please try again.