2 Replies Latest reply on Sep 3, 2013 8:07 AM by AGM

    How to apply a custom rule just to one relational model?



      My design has several relational models, but I want to check custom rules or apply custom transformations just to one specific relational model.

      So, I've created a "Custom library" called "Custom design rules" with the following function:


      function checkColComments(){

        result = true;



        if( !column.getCommentInRDBMS() ){

        ruleMessage = "No comments in RDBMS defined";


        result = false;


        return result;



      In the "Custom Design Rules" I've created a rule "Check column comments" referencing the library and method created previously.


      But, even though I have selected the "relational model" to which I intend to apply this validation rule, the script run for all open models.


      This seems to me a bug (I'm using DDM v3.3.0.747, ) because is asked to select the model to which to apply the script but afterwards this selection is ignored.

      I have not yet tried the v4.0EA to see if it was resolved or not, and the release notes  does not refer to the list of bugs fixed (or I've not found) as it was in version


      Any idea if I'm doing something wrong or if the bug still exists?


        • 1. Re: How to apply a custom rule just to one relational model?
          Philip Stoyanov-Oracle



          design rules (including custom ones) are always applied on one relational model. I wasn't able to reproduce a case when that rule is broken.

          However there is a bug in "Custom Design Rules" functionality and rule is applied on so called "current" model and selected model is ignored.

          That works fine in "Design rules" functionality where selected model is used.

          As workaround for "Custom Design Rules" - you can generate DDL using "Generate DDL" icon and that model will become as "current' relational model.



          • 2. Re: How to apply a custom rule just to one relational model?

            Thanks Philip,


            I have explained poorly the issue of the script runs for *all* open models. Indeed,  the custom design rule runs for tables  on *one* other than the intended relational model, no matter what model I've selected. So, the bug is the same that you have explained.

            And as you said, the workaround of  Generate DDL for the intended relational model to becomes the "selected" model works fine. After that, the script runs smoothly for the intended model.


            Thanks for the right answer.