Verify Error - Multiple foreign key constraints import

Jan 13, 2010 at 6:04 AM

nHydrate verification generates error for multiple referentials integrity constraints bwn two tables.

Eg:. Candidate table with 3 skill columns as col1, col2, col3.  It is expected candidate table doesn't grow beyond 500 rows. Hence no candidate skill table designed.  Yet all col1, col2 and col3 must confine to Skill table's skill id.  SQL 2005 supports multiple RI constrains .  Error displayed on candidate table import & nhydrate verification.

Coordinator
Jan 13, 2010 at 12:06 PM

I think you are talking about multiple relationships between two table. This is supported but you need to to assign role names. The relations need to be "unique" in that the generated code can assign names to them.. This is the reason for having roles. You can set them in the relation dialog. If this is not the problem, please send your model to chrisd@nhydrate.org and I will determine what is wrong and tell you how to address the issue.

Coordinator
Jan 16, 2010 at 7:16 PM

If this is still an issue, please let me know.

Jan 20, 2010 at 5:18 AM

The problem exists. 

Installed ver3.6 and imported tables.  <parentTableRef> value are unique referirng columns of same table.  Error persists "The following tables have conflicting relationships: Skill.Skill_ID-> applicant.primary_skill. delete one or more relationship or assign role names to them."  for sample Applicant & Skill tables.

Is wsgen file sufficient for reference?

 

Coordinator
Feb 8, 2010 at 1:30 AM

As far as I can tell from your description, this is 2 different relations. That is why the validation is triggered. If you have 2 or more relation from TableA -> TableB, you need a tole name to differentiate them. This is handled but you need to name the connection. For example, You could assign the role name "Skill1" or "Athletic", or what ever to TableA.id -> TableB.col1. You then need to assign another role name to TableA.id -> TableB.col2, etc. These are all distinct relations and they are handled. SQL Serer does not require role names however nHydrate does because it must map code to these relations. If you have 3 identical relations it cannot create code distinct for each, hence the role names. Please open the relations dialog for the primary table and you will see 3 relations that look identical. Just double click each relation and define a role name like "Skill1". If you have any questions, please send your model to chrisd@nhydrate.org.