mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-31 10:39:59 +08:00 
			
		
		
		
	Add ArrayExpression support in related tables
This commit is contained in:
		| @ -4,6 +4,7 @@ Yii Framework 2 Change Log | |||||||
| 2.0.16 under development | 2.0.16 under development | ||||||
| ------------------------ | ------------------------ | ||||||
|  |  | ||||||
|  | - Bug #16966: Fix ArrayExpression support in related tables (GHopperMSK) | ||||||
| - Bug #16028: Fix serialization of complex cache keys that contain non-UTF sequences (rugabarbo) | - Bug #16028: Fix serialization of complex cache keys that contain non-UTF sequences (rugabarbo) | ||||||
| - Bug #16945: Fixed RBAC DbManager ruleName fetching on the case of PDO::ATTR_ORACLE_NULLS => PDO::NULL_TO_STRING (razonyang) | - Bug #16945: Fixed RBAC DbManager ruleName fetching on the case of PDO::ATTR_ORACLE_NULLS => PDO::NULL_TO_STRING (razonyang) | ||||||
| - Bug #16081: Fixed composite IN using just one column (rugabarbo) | - Bug #16081: Fixed composite IN using just one column (rugabarbo) | ||||||
|  | |||||||
| @ -525,6 +525,8 @@ trait ActiveRelationTrait | |||||||
|                 if (($value = $model[$attribute]) !== null) { |                 if (($value = $model[$attribute]) !== null) { | ||||||
|                     if (is_array($value)) { |                     if (is_array($value)) { | ||||||
|                         $values = array_merge($values, $value); |                         $values = array_merge($values, $value); | ||||||
|  |                     } elseif(($value instanceof ArrayExpression) && ($value->getDimension() === 1)) { | ||||||
|  |                         $values = array_merge($values, $value->getValue()); | ||||||
|                     } else { |                     } else { | ||||||
|                         $values[] = $value; |                         $values[] = $value; | ||||||
|                     } |                     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 GHopper
					GHopper