SQL Queries - CAST Knowledge Base - Queries on Links - Dynamic Links - How to ignore or validate dynamic links based on object type name

Purpose of Query

This page provides a query to ignore or validate the Dynamic Links based on rules. In the current case, the rule is based on the object type name.

Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(question)
Microsoft SQL Server(question)
CSS2(tick)
Query for CSS
  1. First we check if the query return the links we expect.

    SELECT t1.typnam     AS "CALLER TYPE", 
           k1.idkey      AS "CALLER ID", 
           K1.keynam     AS "CALLER NAME", 
           ofn.fullname  AS "CALLER FULL NAME", 
           t2.typnam     AS "CALLEE TYPE", 
           k2.idkey      AS "CALLEE ID", 
           K2.keynam     AS "CALLEE NAME", 
           ofn2.fullname AS "CALLEE FULL NAME", 
           ac.prop       AS "PROP ID", 
           CASE 
             WHEN ac.prop = 1 THEN 'TO BE REVIEWED' 
             WHEN ac.prop = 65537 THEN 'IGNORED' 
             WHEN ac.prop = 32769 THEN 'VALIDATED' 
           END           AS "TYPE OF LINK" 
    FROM   acc ac 
           join keys k1 
             ON k1.idkey = ac.idclr 
           join objfulnam ofn 
             ON ofn.idobj = k1.idkey 
           join typ t1 
             ON t1.idtyp = k1.objtyp 
                AND t1.typnam = '[Type Name]' -- The list of the type name 
           join keys k2 
             ON k2.idkey = ac.idcle 
           join objfulnam ofn2 
             ON ofn2.idobj = k2.idkey 
           join typ t2 
             ON t2.idtyp = k2.objtyp
    		 AND t2.typnam = '[Type Name]' -- The list of the type name 
    WHERE  prop = 1;  -- 1 is for unreviewed DLM, 65537  for ignored and 32769 for validated

    Results from the query will look like the following showing details on the caller and callee - review the results and make sure that these are the links you want to modify:

    Query result example
     "JV_FIELD";34542;"INCLUDE_PROFILES_PROPERTY";"org.springframework.boot.context.config.ConfigFileApplicationListener.INCLUDE_PROFILES_PROPERTY";"JSP_PROPERTY_MAPPING";4511;"spring.profiles.include";"[C:\CASTMS\Deploy\test835\mongo_java\Mongo\spring-boot-project\spring-boot\src\test\resources\application-morespecific.properties].spring.profiles.include";1;"TO BE REVIEWED"
    "JV_METHOD";6356;"determineProjectType";"org.springframework.boot.cli.command.init.ProjectGenerationRequest.determineProjectType";"JSP_PROPERTY_MAPPING";4497;"value";"[C:\CASTMS\Deploy\test835\mongo_java\Mongo\spring-boot-project\spring-boot\src\test\resources\application.properties].value";1;"TO BE REVIEWED"
  2. Once you have checked the result, you can ignore or validate the dynamic links.

    UPDATE acc
    SET prop = [VALUE]  -- VALUE is 65537 for ignored dynamic links and 32769 for validated dynamic links
    WHERE idacc IN
    (SELECT idacc
    FROM   acc ac 
           join keys k1 
             ON k1.idkey = ac.idclr 
           join objfulnam ofn 
             ON ofn.idobj = k1.idkey 
           join typ t1 
             ON t1.idtyp = k1.objtyp 
                AND t1.typnam = '[Type Name]' -- The list of the type name 
           join keys k2 
             ON k2.idkey = ac.idcle 
           join objfulnam ofn2 
             ON ofn2.idobj = k2.idkey 
           join typ t2 
             ON t2.idtyp = k2.objtyp
    		 AND t2.typnam = '[Type Name]' -- The list of the type name 
    WHERE  prop = 1);  -- 1 is for unreviewed DLM, 65537  for ignored and 32769 for validated

This query will just return with an indication of the number of rows modified.

Notes/comments



Related Pages