Page 1 of 1
Class Association - column name Issue
Posted: Tue 18 Apr 2017 03:02
by RobertK
When you create an association the column name is always "Id"
This causes a problem because the primary id column name is often "Id", also when you keep adding new association the column name would also be "Id" it causes conflict.
By default, shouldn't the associated column name be the name of the primary key of the assoicated class/table?
Re: Class Association - column name Issue
Posted: Thu 20 Apr 2017 13:43
by Shalex
We cannot reproduce the issue. Entity Developer checks if the name ("Id") is used in CSDL / SSDL and, if so, generates a different name ("Class1Id", "Id1", etc).
If this information doesn't help,
send us a test model and specify the exact steps for reproducing.
Re: Class Association - column name Issue
Posted: Thu 20 Apr 2017 14:04
by RobertK
I tried this multiple times.
The property that gets added is always "id", add a number of associations and you will see all foreign key properties are added as "id"
Re: Class Association - column name Issue
Posted: Thu 20 Apr 2017 19:02
by Shalex
1. Is your model *.edml or *.efml?
2. Where does the naming issue persist (in CSDL or in SSDL)?
3. If it is possible, please
send us a test model and specify the exact steps for reproducing.
Re: Class Association - column name Issue
Posted: Fri 21 Apr 2017 06:01
by RobertK
Issue is highlighted in yellow
This is when you add a 1.* all associations property name is correct, but all column naming of "Id" this is incorrect it should be the same as the property name!
https://imghost.io/images/2017/04/21/Cl ... 155817.png
Re: Class Association - column name Issue
Posted: Fri 21 Apr 2017 06:04
by RobertK
Note: If you fix this bug, and make the column name the same name os the property name, it will cause a different type of bug! (it be ok for sql server, but not ok for mysql, postgres)
Since I am using postgres, I want all table names and column names to be snake casing.
Right now snake casing is not supported by entity developer! snake casing is the standard naming convention for mysql and postgres.
Re: Class Association - column name Issue
Posted: Fri 21 Apr 2017 17:07
by Shalex
RobertK wrote:when you add a 1.* all associations property name is correct, but all column naming of "Id" this is incorrect it should be the same as the property name!
Thank you for your report. We have reproduced the bug and will notify you when it is fixed.
RobertK wrote:I want all table names and column names to be snake casing.
The Snake case in both Model and Database naming rules is supported. We will notify you when the new build of Entity Developer is available for download.
Re: Class Association - column name Issue
Posted: Fri 26 May 2017 16:48
by Shalex
The Snake case in both Model and Database naming rules is supported via the new "Add underscore" option in the new build:
viewtopic.php?f=32&t=35443.
Re: Class Association - column name Issue
Posted: Tue 30 May 2017 14:45
by RobertK
Shalex wrote:The Snake case in both Model and Database naming rules is supported via the new "Add underscore" option in the new build:
viewtopic.php?f=32&t=35443.
this is very cool, thanks! huge time saver!