File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -771,9 +771,7 @@ private function getExpressionValues(Model $entity): array
771771 {
772772 $ dummyFields = $ this ->getExpressionFields ($ entity );
773773 foreach ($ dummyFields as $ k => $ field ) {
774- if (!$ field ->expr instanceof \Closure) {
775- $ dummyFields [$ k ]->expr = $ this ->getDummyExpression ($ field , $ entity );
776- }
774+ $ dummyFields [$ k ]->expr = $ this ->getDummyExpression ($ field , $ entity );
777775 }
778776
779777 if ($ dummyFields === []) {
@@ -830,6 +828,9 @@ private function getExpressionValues(Model $entity): array
830828 private function getDummyExpression (SqlExpressionField $ exprField , Model $ entity )
831829 {
832830 $ expr = $ exprField ->expr ;
831+ if ($ expr instanceof \Closure) {
832+ $ expr = $ exprField ->getDsqlExpression ($ entity ->getModel ()->expr ('' ));
833+ }
833834 if ($ expr instanceof Persistence \Sql \Expression) {
834835 $ expr = \Closure::bind (fn () => $ expr ->template , null , Persistence \Sql \Expression::class)();
835836 }
You can’t perform that action at this time.
0 commit comments