You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/13 03:56:28 UTC

[GitHub] [dolphinscheduler] EricGao888 commented on a diff in pull request #11743: [Bug] [Dependent] For accounts other than admin, add dependent cannot discover the projects it created

EricGao888 commented on code in PR #11743:
URL: https://github.com/apache/dolphinscheduler/pull/11743#discussion_r969125478


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProjectMapper.xml:
##########
@@ -169,6 +169,13 @@
         <if test="userId != 0">
             right join t_ds_relation_project_user rpu on p.id = rpu.project_id
             where rpu.user_id = #{userId}
+            union
+            select
+            <include refid="baseSqlV2">
+                <property name="alias" value="p2"/>
+            </include>
+            from t_ds_project p2
+            where p2.user_id = #{userId}

Review Comment:
   I prefer to doing this in service level instead of with sql. If we have complex logic in both service and sql level, it is much easier to introduce new bugs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org