Foriegn Keys Question

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
jamesklett
Posts: 7
Joined: Tue 08 Jan 2013 17:42

Foriegn Keys Question

Post by jamesklett » Wed 09 Jan 2013 18:54

How do I get the Db First code generator to include my foreign key columns? The relationship associations are created but not the FK's. Our current system uses int PK's that we use heavily throughout our system. Having the FK I in the entity saves a fetch to the database of the related entity when all you want to know id the ID the related object.

thanks
JAMES

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Foriegn Keys Question

Post by Shalex » Thu 10 Jan 2013 15:41

jamesklett wrote:The relationship associations are created but not the FK's.
Please create the FK property manually.
We are investigating the possibility of adding the "Add foreign key properties to the child class" option in Association Editor of NHibernate Model.

jamesklett
Posts: 7
Joined: Tue 08 Jan 2013 17:42

Re: Foriegn Keys Question

Post by jamesklett » Thu 10 Jan 2013 17:19

This wont do for me. I have 150+ tables with thousands of fields and hundreds of FK's, to do this manually would take months as I have other work to do besides just this

thanks

JAMES

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Foriegn Keys Question

Post by Shalex » Fri 11 Jan 2013 16:45

You are correct. We have implemented the "Include foreign key columns in the model" property of the model (one setting for all tables). We will post here when the corresponding build of Entity Developer is available for download.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Foriegn Keys Question

Post by Shalex » Thu 17 Jan 2013 17:49

New build of Entity Developer 5.0.28 is available!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=25671.

Be aware that the "Include foreign key columns in the model" option can be applied only for the Database First approach.

Post Reply