msawczyn / EFDesigner2022

Entity Framework visual design surface and code-first code generation for EF6, Core and beyond
MIT License
123 stars 21 forks source link

Many-to-many foreing key column name #71

Closed BlackPuddingERP closed 1 year ago

BlackPuddingERP commented 1 year ago

Hi,

I am trying to create an n:n relationship between two tables whose primary keys are named the same, 'Id.' This causes an error when generating the database, obviously because it tries to create the intermediate table with two properties with the same name (although this only happens when the data types of the primary keys of the tables are different, if they are the same, it doesn't give any error and simply generates an intermediate table with a single property). The thing is, I have seen that in the relationship, there are properties called 'End1 Foreign Key Column Name' and 'End1 Foreign Key Column Name,' I understand that these are supposed to allow you to choose how you want to name those properties of the intermediate tables. However, no matter how much I have tried to modify these values, they never seem to apply, and it continues generating it as 'HasForeignKey("Id").' I understand that this is a bug, right?

Thank you

msawczyn commented 1 year ago

Duplicate #64