Generation of some Foreign Keys not occurring

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
pcrissman
Posts: 8
Joined: Mon 28 Sep 2009 13:16

Generation of some Foreign Keys not occurring

Post by pcrissman » Mon 12 Oct 2009 20:51

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

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 15 Oct 2009 10:47

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?

pcrissman
Posts: 8
Joined: Mon 28 Sep 2009 13:16

Post by pcrissman » Thu 15 Oct 2009 11:53

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

Post Reply