@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | $insertSql = new \Sirius\Sql\Insert($connection); |
30 | 30 | $insertSql->into($this->mapper->getTable()) |
31 | - ->columns($columns); |
|
31 | + ->columns($columns); |
|
32 | 32 | $insertSql->perform(); |
33 | 33 | $this->entity->setPk($connection->lastInsertId()); |
34 | 34 | } |
@@ -21,10 +21,10 @@ |
||
21 | 21 | |
22 | 22 | $update = new \Sirius\Sql\Update($this->mapper->getWriteConnection()); |
23 | 23 | $update->table($this->mapper->getTable()) |
24 | - ->columns([ |
|
25 | - $this->getOption('deleted_at_column') => $this->now |
|
26 | - ]) |
|
27 | - ->where('id', $entityId); |
|
24 | + ->columns([ |
|
25 | + $this->getOption('deleted_at_column') => $this->now |
|
26 | + ]) |
|
27 | + ->where('id', $entityId); |
|
28 | 28 | $update->perform(); |
29 | 29 | } |
30 | 30 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | |
84 | 84 | $insert = new \Sirius\Sql\Insert($conn); |
85 | 85 | $insert->into($throughTable) |
86 | - ->columns($insertColumns) |
|
87 | - ->perform(); |
|
86 | + ->columns($insertColumns) |
|
87 | + ->perform(); |
|
88 | 88 | } |
89 | 89 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function hydrate(array $attributes = []) |
33 | 33 | { |
34 | 34 | $attributes = $this->castingManager |
35 | - ->castArray($attributes, $this->mapper->getCasts()); |
|
35 | + ->castArray($attributes, $this->mapper->getCasts()); |
|
36 | 36 | $attributes = Arr::renameKeys($attributes, $this->mapper->getColumnAttributeMap()); |
37 | 37 | $class = $this->mapper->getEntityClass() ?? GenericEntity::class; |
38 | 38 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | array_flip($this->mapper->getColumnAttributeMap()) |
47 | 47 | ); |
48 | 48 | $data = $this->castingManager |
49 | - ->castArrayForDb($data, $this->mapper->getCasts()); |
|
49 | + ->castArrayForDb($data, $this->mapper->getCasts()); |
|
50 | 50 | |
51 | 51 | return Arr::only($data, $this->mapper->getColumns()); |
52 | 52 | } |
@@ -55,8 +55,8 @@ |
||
55 | 55 | if (count($columns) > 0) { |
56 | 56 | $updateSql = new \Sirius\Sql\Update($connection); |
57 | 57 | $updateSql->table($this->mapper->getTable()) |
58 | - ->columns($columns) |
|
59 | - ->whereAll($conditions, false); |
|
58 | + ->columns($columns) |
|
59 | + ->whereAll($conditions, false); |
|
60 | 60 | $updateSql->perform(); |
61 | 61 | } |
62 | 62 | } |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | public function joinSubselect(Query $query, string $reference) |
29 | 29 | { |
30 | 30 | $subselect = $query->subSelectForJoinWith() |
31 | - ->from($this->foreignMapper->getTable()) |
|
32 | - ->columns($this->foreignMapper->getTable() . '.*') |
|
33 | - ->as($reference); |
|
31 | + ->from($this->foreignMapper->getTable()) |
|
32 | + ->columns($this->foreignMapper->getTable() . '.*') |
|
33 | + ->as($reference); |
|
34 | 34 | |
35 | 35 | $subselect = $this->applyQueryCallback($subselect); |
36 | 36 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $this->addActionOnSave($action); |
109 | 109 | } else { |
110 | 110 | $foreignEntity = $this->nativeMapper |
111 | - ->getEntityAttribute($action->getEntity(), $this->name); |
|
111 | + ->getEntityAttribute($action->getEntity(), $this->name); |
|
112 | 112 | |
113 | 113 | if ($foreignEntity) { |
114 | 114 | $remainingRelations = $this->getRemainingRelations($action->getOption('relations')); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $this->addActionOnSave($action); |
35 | 35 | } else { |
36 | 36 | $foreignEntity = $this->nativeMapper |
37 | - ->getEntityAttribute($action->getEntity(), $this->name); |
|
37 | + ->getEntityAttribute($action->getEntity(), $this->name); |
|
38 | 38 | |
39 | 39 | if ($foreignEntity) { |
40 | 40 | $remainingRelations = $this->getRemainingRelations($action->getOption('relations')); |
@@ -48,9 +48,9 @@ |
||
48 | 48 | public function joinSubselect(Query $query, string $reference) |
49 | 49 | { |
50 | 50 | $subselect = $query->subSelectForJoinWith() |
51 | - ->columns($this->foreignMapper->getTable() . '.*') |
|
52 | - ->from($this->foreignMapper->getTable()) |
|
53 | - ->as($reference); |
|
51 | + ->columns($this->foreignMapper->getTable() . '.*') |
|
52 | + ->from($this->foreignMapper->getTable()) |
|
53 | + ->as($reference); |
|
54 | 54 | |
55 | 55 | $subselect = $this->applyQueryCallback($subselect); |
56 | 56 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | ->newQuery(); |
61 | 61 | |
62 | 62 | $query = $this->joinWithThroughTable($query) |
63 | - ->where($this->options[RelationConfig::THROUGH_NATIVE_COLUMN], $nativePks); |
|
63 | + ->where($this->options[RelationConfig::THROUGH_NATIVE_COLUMN], $nativePks); |
|
64 | 64 | |
65 | 65 | $query = $this->applyQueryCallback($query); |
66 | 66 | |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | public function joinSubselect(Query $query, string $reference) |
113 | 113 | { |
114 | 114 | $subselect = $query->subSelectForJoinWith() |
115 | - ->from($this->foreignMapper->getTable()) |
|
116 | - ->columns($this->foreignMapper->getTable() . '.*') |
|
117 | - ->as($reference); |
|
115 | + ->from($this->foreignMapper->getTable()) |
|
116 | + ->columns($this->foreignMapper->getTable() . '.*') |
|
117 | + ->as($reference); |
|
118 | 118 | |
119 | 119 | $subselect = $this->joinWithThroughTable($subselect); |
120 | 120 |