Two FKs to same table

Posts   
 
    
Deividas
User
Posts: 44
Joined: 01-Oct-2010
# Posted on: 01-Oct-2010 12:58:00   

Hello,

I have two tables - Contact and Address:

Contact: ID int identity, Phone varchar(20), Email varchar(50), AddressId int, MailToAddressId int

Address: ID int identity, and other fields (not important).

When I generate the code (adapter), I get these fields in the ContactEntity: Address and Address_. I, of course, would like the fields to be Address and MailToAddress instead. Is there a way to do this?

I've tried to change FkFieldsAreNamedAfterTargetField and ForeignKeyFieldPattern settings in designer, but they seem to do absolutely nothing - not a single line of code was changed in a project of ~50 tables.

I am using Version 3.0 Final (released on September 8th, 2010).

taylor74
User
Posts: 59
Joined: 06-Oct-2004
# Posted on: 01-Oct-2010 23:50:22   

Try expanding the Contact entity in the tree in the project explorer to find and expand Navigators. Then, you can choose the one you want to rename. You can also expand Relationships and edit the appropriate relationship, which also allows renaming the navigators.

Hope that helps.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 02-Oct-2010 05:23:50   

taylor74 wrote:

Try expanding the Contact entity in the tree in the project explorer to find and expand Navigators. Then, you can choose the one you want to rename. You can also expand Relationships and edit the appropriate relationship, which also allows renaming the navigators.

That is just right simple_smile

David Elizondo | LLBLGen Support Team
Deividas
User
Posts: 44
Joined: 01-Oct-2010
# Posted on: 03-Oct-2010 15:06:21   

Thanks, that is exactly what I needed.