When attempting to generate DDL for a model on SQL Server 2008, the generation fails at the Relationships step, and I’m greeted with a message of:
Source: Microsoft JScript run time Error
Script: PERCodeGeneratorMS
Description: ‘ForeignKeys.GetObject(…).AttrChild’ is null or not an object.
Row: 2224
Column: 5
(See the attachment for more information).
Not cool, as we just bought this tool due to Visio not being being able to generate DDL. Now it doesn’t work here???
Question - did you run a model check report? Sometimes tools will let you do things that make little sense, and can result in errors during DDL generation. For example making a mutli-column FK have some columns with NULL and some with NOT NULL would show up as an error during the model check report - and could easily cuase problems either during the DDL generation step or when you try to run the DDL.
The point: ALWAYS run the model verification reports as part of your moldeing emthodology …