Page 1 of 1

Foriegn Keys Question

Posted: Wed 09 Jan 2013 18:54
by jamesklett
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

Re: Foriegn Keys Question

Posted: Thu 10 Jan 2013 15:41
by Shalex
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.

Re: Foriegn Keys Question

Posted: Thu 10 Jan 2013 17:19
by jamesklett
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

Re: Foriegn Keys Question

Posted: Fri 11 Jan 2013 16:45
by Shalex
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.

Re: Foriegn Keys Question

Posted: Thu 17 Jan 2013 17:49
by Shalex
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.