- Some bugfixes applied live
This commit is contained in:
		
							parent
							
								
									c2cccc0222
								
							
						
					
					
						commit
						acab934f6f
					
				| @ -125,7 +125,7 @@ trait SqlAdapterTrait | ||||
|         ]); | ||||
|     } | ||||
| 
 | ||||
|     public function writableValue(mixed  $value) : mixed | ||||
|     public function writableValue(mixed $value) : mixed | ||||
|     { | ||||
|         switch (true) { | ||||
|             case $value instanceof \UnitEnum: | ||||
|  | ||||
| @ -157,7 +157,7 @@ trait EntityTrait { | ||||
|             $annotation = $entityResolver->searchFieldAnnotation($key, [ Attribute\Property\Field::class, Field::class ]); | ||||
| 
 | ||||
|             if ( isset($this->$key) ) { | ||||
|                 $dataset[$annotation->name ?? $key] = $rewriteValue? | ||||
|                 $dataset[$annotation->name ?? $key] = $rewriteValue ? | ||||
|                     static::repository()->adapter->adapter()->writableValue($this->$key) | ||||
|                 : | ||||
|                     $this->$key; | ||||
| @ -195,9 +195,9 @@ trait EntityTrait { | ||||
|     } | ||||
| 
 | ||||
|     #[Ignore]
 | ||||
|     public function toArray($includeRelations = false, array $filterFields = null) : array | ||||
|     public function toArray($includeRelations = false, array $filterFields = null, bool $rewriteValue = true) : array | ||||
|     { | ||||
|         $dataset = $this->entityGetDataset($includeRelations, false, false); | ||||
|         $dataset = $this->entityGetDataset($includeRelations, false, $rewriteValue); | ||||
| 
 | ||||
|         return $filterFields ? array_intersect_key($dataset, array_flip($filterFields)) : $dataset; | ||||
|     } | ||||
|  | ||||
| @ -42,7 +42,7 @@ class Values extends Fragment { | ||||
|     public function renderParameterPlaceholders() : string  | ||||
|     { | ||||
|         $return = []; | ||||
|          | ||||
| 
 | ||||
|         foreach($this->rows as $row) { | ||||
|             if ($this->fieldCount === null) { | ||||
|             } | ||||
|  | ||||
| @ -528,6 +528,7 @@ class QueryBuilder implements Query\QueryBuilderInterface | ||||
|     { | ||||
|         $this->values = $values; | ||||
|     } | ||||
|      | ||||
|     protected function nextJoinOrder() : float | ||||
|     { | ||||
|         $next = 0; | ||||
|  | ||||
| @ -450,7 +450,6 @@ class Repository | ||||
|     public function values(array $dataset) : self | ||||
|     { | ||||
|         $this->queryBuilder->values($dataset); | ||||
| 
 | ||||
|         return $this; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -130,7 +130,7 @@ class RelationBuilder | ||||
| 
 | ||||
|                     $this->entity->eventExecute(Event\EntityRelationLoadInterface::class, $name, $this->repository); | ||||
| 
 | ||||
|                     $results = call_user_func([ $this->repository, $relationRelation->function() ]); | ||||
|                     $results = call_user_func([ $this->repository, 'loadAll' /*$relationRelation->function()*/ ]); | ||||
| 
 | ||||
|                     if ($relation->bridgeField ?? false) { | ||||
|                         $collection = $relation->bridge::entityCollection(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user