CodeSmith Community
Your Code. Your Way. Faster!

Is this a bug? No NotNull Validtation Rule generated for FK

Latest post 11-20-2006 7:19 PM by velum. 0 replies.
  • 11-20-2006 7:19 PM

    • velum
    • Top 25 Contributor
    • Joined on 07-14-2006
    • Montréal, Qc, Canada
    • Posts 189
    • Points 4,731

    Is this a bug? No NotNull Validtation Rule generated for FK

    Hi!

    I noticed something that may be a bug. In my database I have a table containing an FK defined as an Int and "Not Null". When I look at the AddValidationRules() method in the base class of the object generated for that table, I don't find any Not Null rule for the FK like the following:

     ValidationRules.AddRule(Validation.CommonRules.NotNull,"someID");   //Where someID is my FK

    However, I find all the necessary Not Null Rules for Strings that should not be Null.

    I think it would be nice if all the rules that can be derived from the database would be added automatically.

    Cheers!

    JF
     

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems