Compare commits
No commits in common. "c1755d250be524bbad1b6751e94531bb72817d32" and "2e377374d4491a39ed3c3a1ac0aea56b8bab7423" have entirely different histories.
c1755d250b
...
2e377374d4
@ -125,7 +125,7 @@ trait SqlAdapterTrait
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function writableValue(mixed $value) : mixed
|
public function writableValue(mixed $value) : mixed
|
||||||
{
|
{
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $value instanceof \UnitEnum:
|
case $value instanceof \UnitEnum:
|
||||||
|
@ -158,7 +158,7 @@ trait EntityTrait {
|
|||||||
$annotation = $entityResolver->searchFieldAnnotation($key, [ Attribute\Property\Field::class, Field::class ]);
|
$annotation = $entityResolver->searchFieldAnnotation($key, [ Attribute\Property\Field::class, Field::class ]);
|
||||||
|
|
||||||
if ( isset($this->$key) ) {
|
if ( isset($this->$key) ) {
|
||||||
$dataset[$annotation->name ?? $key] = $rewriteValue ?
|
$dataset[$annotation->name ?? $key] = $rewriteValue?
|
||||||
static::repository()->adapter->adapter()->writableValue($this->$key)
|
static::repository()->adapter->adapter()->writableValue($this->$key)
|
||||||
:
|
:
|
||||||
$this->$key;
|
$this->$key;
|
||||||
@ -196,9 +196,9 @@ trait EntityTrait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Ignore]
|
#[Ignore]
|
||||||
public function toArray($includeRelations = false, array $filterFields = null, bool $rewriteValue = true) : array
|
public function toArray($includeRelations = false, array $filterFields = null) : array
|
||||||
{
|
{
|
||||||
$dataset = $this->entityGetDataset($includeRelations, false, $rewriteValue);
|
$dataset = $this->entityGetDataset($includeRelations, false, false);
|
||||||
|
|
||||||
return $filterFields ? array_intersect_key($dataset, array_flip($filterFields)) : $dataset;
|
return $filterFields ? array_intersect_key($dataset, array_flip($filterFields)) : $dataset;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ class Values extends Fragment {
|
|||||||
public function renderParameterPlaceholders() : string
|
public function renderParameterPlaceholders() : string
|
||||||
{
|
{
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
foreach($this->rows as $row) {
|
foreach($this->rows as $row) {
|
||||||
if ($this->fieldCount === null) {
|
if ($this->fieldCount === null) {
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,6 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
|||||||
{
|
{
|
||||||
$this->values = $values;
|
$this->values = $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function nextJoinOrder() : float
|
protected function nextJoinOrder() : float
|
||||||
{
|
{
|
||||||
$next = 0;
|
$next = 0;
|
||||||
|
@ -450,6 +450,7 @@ class Repository
|
|||||||
public function values(array $dataset) : self
|
public function values(array $dataset) : self
|
||||||
{
|
{
|
||||||
$this->queryBuilder->values($dataset);
|
$this->queryBuilder->values($dataset);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ class RelationBuilder
|
|||||||
|
|
||||||
$this->entity->eventExecute(Event\EntityRelationLoadInterface::class, $name, $this->repository);
|
$this->entity->eventExecute(Event\EntityRelationLoadInterface::class, $name, $this->repository);
|
||||||
|
|
||||||
$results = call_user_func([ $this->repository, 'loadAll' /*$relationRelation->function()*/ ]);
|
$results = call_user_func([ $this->repository, $relationRelation->function() ]);
|
||||||
|
|
||||||
if ($relation->bridgeField ?? false) {
|
if ($relation->bridgeField ?? false) {
|
||||||
$collection = $relation->bridge::entityCollection();
|
$collection = $relation->bridge::entityCollection();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user