How to customize navigation property naming?

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
RobertK
Posts: 111
Joined: Thu 02 Mar 2017 05:44

How to customize navigation property naming?

Post by RobertK » Wed 31 May 2017 14:43

Format: ("ReferenceClassName_PropertyName")

Example
Profile has 1.* Countries

Profile
-CountryId
-CitizenCountryId
-FirstName
-LastName

Navigation Properties
Profile => "Country_CountryId", "Country_CitizenCountryId"
Country => "Profiles_CountryId", "Profiles_CitizenCountryId"


This is more meaningful than having Country1, Country2, Profiles, Profiles2 etc..

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

Re: How to customize navigation property naming?

Post by Shalex » Tue 06 Jun 2017 09:30

Please open Model Settings > Synchronization > Model Naming and select "Add constraint details to navigation properties" to name navigation properties "ReferenceClassName_PropertyName".

RobertK
Posts: 111
Joined: Thu 02 Mar 2017 05:44

Re: How to customize navigation property naming?

Post by RobertK » Thu 20 Sep 2018 02:20

If you manually renamed the navigation properties how do you reset all classes to use the standard naming rule?

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

Re: How to customize navigation property naming?

Post by Shalex » Thu 20 Sep 2018 13:45

Naming rules are applied only for the newly added entities. Please remove and readd your entities to the model.

Post Reply