cancel
Showing results for 
Search instead for 
Did you mean: 

PowerDesigner error: Package constraint name uniqueness reference

Former Member
0 Kudos

contraint-name-uniqueness.jpg

Hi

I'm experiencing an error when I check my model; Category - Package; Check- Package constraint name uniqueness; Object - Reference

Please assist

Regards

Nombulelo

Accepted Solutions (0)

Answers (2)

Answers (2)

GeorgeMcGeachie
Active Contributor
0 Kudos

The constraint name is derived according to the rules in the database definition, you can see the result on the Integrity tab for the reference. Open a list of references in the package, ensure you display the Constraint Name - now sort the list by the Constraint name, see if the constraint name for Reference_11 is the same as for another reference. If so, I suggest giving the reference a more meaningful name.

For example, the Constraint names in redshift are based on this template:

FK_%.U20:CHILD%_%.U:REFR%_%.U20:PARENT%, where

%.U20:CHILD% = first 20 characters of child table Code, in upper case

%.U:REFR% = the code of the Reference, in upper case

%.U20:PARENT% = first 20 characters of parent table Code, in upper case

GeorgeMcGeachie
Active Contributor
0 Kudos

PD will allow you to have two references with the same name, as long as they aren't between the same pair of tables. In this example, I suspect that the duplication is caused by having tables with very similar long names, and the first 20 characters of the code are the same.

Perhaps the constraint name template could be changed to

FK_%.U10:CHILD%_%.U-10:CHILD%_%.U:REFR%_%.U10:PARENT%_%.U-10:PARENT%

This template uses the first and last 10 characters of each table name.

former_member438037
Participant
0 Kudos

How did you create your model? Have you created it from scratch or have you imported it from Erwin for example? Are there really more references with the same name in your model? What is your PD version? Have you followed the advice in help, which is connected with this error? (open context menu on your error in your result list and click Help...)?


Ondrej