File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
packages/database/src/Builder/QueryBuilders Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -137,18 +137,11 @@ public function toRawSql(): ImmutableString
137137
138138 public function build (mixed ...$ bindings ): Query
139139 {
140- $ count = $ this ->count ;
141-
142140 if ($ this ->joins !== []) {
143- $ count = new CountStatement (
144- table: $ count ->table ,
145- column: $ count ->column ,
146- where: $ count ->where ,
147- distinct: $ count ->distinct ,
148- joins: arr ($ this ->joins )->map (fn (JoinStatement |string $ join ) => $ join instanceof JoinStatement ? $ join : new JoinStatement ($ join )),
149- );
141+ $ this ->count ->joins = arr ($ this ->joins )
142+ ->map (fn (JoinStatement |string $ join ) => $ join instanceof JoinStatement ? $ join : new JoinStatement ($ join ));
150143 }
151144
152- return new Query ($ count , [...$ this ->bindings , ...$ bindings ])->onDatabase ($ this ->onDatabase );
145+ return new Query ($ this -> count , [...$ this ->bindings , ...$ bindings ])->onDatabase ($ this ->onDatabase );
153146 }
154147}
You can’t perform that action at this time.
0 commit comments