Page 1 of 1

Generation of some Foreign Keys not occurring

Posted: Mon 12 Oct 2009 20:51
by pcrissman
I am using the latest build from Devart - 2.20.38. We have a large database with numerous tables and many foreign keys. It seems that the majority of the model is generating correctly.

We have just a few foreign keys that don't seem to be generating. As an example:

We have a Participation_Set table and a Participation_Category table with a primary key of Participation_Category_id (guid). There is a Participation_category_id on Participation_set with foreign key to Participation_category:

ALTER TABLE PARTICIPATION_SET ADD (
CONSTRAINT FK_PARTICIPATION_SET_PART_CAT
FOREIGN KEY (PARTICIPATION_CATEGORY_ID)
REFERENCES PARTICIPATION_CATEGORY (PARTICIPATION_CATEGORY_ID));

For some reason, the entity developer is not recognizing this foreign key.. creates no association and generates a property on the class of type guid, instead of the expected Reference. The only thing I can think of is there is an issue with the length of the primary key? as most of our tables and primary key names are a bit smaller. Are you aware of some type of limitation in regards to field names that will then be used a foreign keys?

Thanks,
Pam Crissman

Posted: Thu 15 Oct 2009 10:47
by AndreyR
There should be no problem with the name of the relation.
Could you please post here or send me (support * devart * com, subject "ED: Association")
the script of tables and the foreign key causing the error?

Posted: Thu 15 Oct 2009 11:53
by pcrissman
We located the issue yesterday. We had the index and primary key named differently in the script by a char or two. After fixing this the problem was resolved.

Thanks,

Pam Crissman