in

The ORM Foundation

Get the facts!

Some constraints not verbalized in the html report

Last post 05-29-2013 8:55 by Ken Evans. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-22-2013 15:19

    Some constraints not verbalized in the html report

    Hi, In the Constraint Validation Report (html) Internal Uniqueness Constraints are often not verbalized (missing); same with Simple Mandatory Constraints. Can not find the pattern, except that the first FactType listed on the report usually have them verbalized, after that they are missing? For Example (model): Accountant(.name) approved Payment(.nr) Accountant(.name) processed Payment(.nr) // both unique and mandatory on the "payment side" Both are properly verbalized in the ORM verbalization Browser, but in the html Constraint Validation Report only the first one has verbalization for Internal Uniqueness Constraint and Simple Mandatory Constraint. Have VS2012 and the latest version of NORMA Any ideas?
    Filed under: ,
  • 03-31-2013 17:09 In reply to

    Re: Some constraints not verbalized in the html report

     Sorry for the delay in replying to your query.

    Matt is the only one who can give you a definitive answer.

    I emailed him a week ago.

    Ken

  • 04-06-2013 19:53 In reply to

    Re: Some constraints not verbalized in the html report

    Answer

    Hello Damir, 

    Sorry for the slow answer. I glanced at the individual fact type pages (linked from the object types) and didn't see the issue, then I looked at an older report and saw no problem, and then procrastinated. Apparently I hadn't pulled a report in a while because this is indeed broken.

    The issue traces back to changeset 1484 (April 13 2012), which updated verbalization patterns for uniqueness, mandatory, and frequency constraints. The issue is that these started using new helper objects for uniqueness verbalization. The helper objects are deferred to by the primary verbalizer, and are cached--you generally have exactly one in use at any given time, so I recycle the instance. This seems innocent enough, but the default verbalization implementation will not repeat itself. The second time a helper object of the same type was encountered (on the second fact type), the verbalizer decided the object was already verbalized (because of the recylced instance) and produced no output!

    I have a local fix for this (I changed the GetHashCode and Equals functions of all helpers so they are only considered equal if they are currently repeating a verbalization). I'll get it in the next NORMA drop.

    If this is mission critical for you, please let me know in a private message. Otherwise, this will be fixed in the next NORMA release.

    -Matt

  • 04-08-2013 9:22 In reply to

    Re: Some constraints not verbalized in the html report

    Thanks Matthew, no urgency here.
  • 05-29-2013 8:55 In reply to

    Re: Some constraints not verbalized in the html report

     Damir,

    This bug has been fixed.

    The fix is incorporated in the new release of NORMA published today, 29 May 2013. 

Page 1 of 1 (5 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service