feature/use-the-same-table-in-multiple-joins #14
@ -227,12 +227,16 @@ class PersistentDataManager implements IPersistentDataManager
 | 
			
		||||
 | 
			
		||||
                next($data);
 | 
			
		||||
            } else if (substr($key, 0, strlen($relation . '__')) === $relation . '__') {
 | 
			
		||||
                $relationType = current($relations);
 | 
			
		||||
                $relationModel = new $relationType();
 | 
			
		||||
                $this->fillWithData($data, $relationModel, $withRelations, $relation);
 | 
			
		||||
                if ($data[$relation . '__id'] !== null) {
 | 
			
		||||
                    $relationType = current($relations);
 | 
			
		||||
                    $relationModel = new $relationType();
 | 
			
		||||
                    $this->fillWithData($data, $relationModel, $withRelations, $relation);
 | 
			
		||||
 | 
			
		||||
                $method = 'set' . str_replace('_', '', ucwords($relation, '_'));
 | 
			
		||||
                $model->$method($relationModel);
 | 
			
		||||
                    $method = 'set' . str_replace('_', '', ucwords($relation, '_'));
 | 
			
		||||
                    $model->$method($relationModel);
 | 
			
		||||
                } else {
 | 
			
		||||
                    next($data);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                next($relations);
 | 
			
		||||
            } else {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user