File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Service/QueryModifier/Easy Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public function methodExists($method)
7979 */
8080 public function orderBy (string $ dotProperty , $ order = Criteria::ASC ): ModelCriteria
8181 {
82- $ property = $ this ->before ($ dotProperty );
82+ $ property = $ this ->before ($ dotProperty, Criteria:: LEFT_JOIN );
8383 $ method = $ this ->buildMethodName (__FUNCTION__ , $ property );
8484 try {
8585 $ this ->query = $ this ->query ->{$ method }($ order );
@@ -111,19 +111,19 @@ private function after()
111111
112112 /**
113113 * @param string $dotProperty
114- *
114+ * @param string|null $joinType
115115 * @return string
116116 * @throws UseQueryFromDotNotationException
117117 */
118- private function before (string $ dotProperty )
118+ private function before (string $ dotProperty, string $ joinType = null )
119119 {
120120
121121 $ dotProperty = trim ($ dotProperty , UseQueryFromDotNotation::RELATION_SEP );
122122 $ parts = explode (UseQueryFromDotNotation::RELATION_SEP , $ dotProperty );
123123 $ property = ucfirst (array_pop ($ parts ));
124124
125125 $ this ->dotUseQuery = new UseQueryFromDotNotation ($ this ->query );
126- $ this ->query = $ this ->dotUseQuery ->fromArray ($ parts )->useQuery ();
126+ $ this ->query = $ this ->dotUseQuery ->fromArray ($ parts )->useQuery (null , $ joinType );
127127
128128 return $ property ;
129129 }
You can’t perform that action at this time.
0 commit comments