File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -106,18 +106,17 @@ public function getClientById(string $client_id):?Client
106106 */
107107 public function getClientByIdCacheable (string $ client_id , bool $ withResourceServer = true ):?Client
108108 {
109- return $ this ->getEntityManager ()
110- ->createQueryBuilder ()
111- ->select ("c " )
112- ->from ($ this ->getBaseEntity (), "c " )
113- ->where ("c.client_id = (:client_id) " )
114- ->setParameter ("client_id " , trim ($ client_id ))
109+ $ qb = $ this ->getEntityManager ()->createQueryBuilder ()
110+ ->select ('c ' )
111+ ->from ($ this ->getBaseEntity (), 'c ' )
112+ ->where ('c.client_id = :client_id ' )
113+ ->setParameter ('client_id ' , trim ($ client_id ))
115114 ->setMaxResults (1 );
116115
117116 if ($ withResourceServer ) {
118- // fetch join dirigido
117+
119118 $ qb ->addSelect ('rs ' )
120- ->leftJoin ('c.resource_server ' , 'rs ' ); // JOIN FETCH implícito por el addSelect + asociación
119+ ->leftJoin ('c.resource_server ' , 'rs ' );
121120 }
122121
123122 $ q = $ qb ->getQuery ();
You can’t perform that action at this time.
0 commit comments