Class Association - column name Issue

Class Association - column name Issue

Postby RobertK » Tue 18 Apr 2017 03:02

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?
RobertK
 
Posts: 34
Joined: Thu 02 Mar 2017 05:44

Re: Class Association - column name Issue

Postby Shalex » Thu 20 Apr 2017 13:43

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.
Shalex
Devart Team
 
Posts: 7344
Joined: Thu 14 Aug 2008 12:44

Re: Class Association - column name Issue

Postby RobertK » Thu 20 Apr 2017 14:04

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"
RobertK
 
Posts: 34
Joined: Thu 02 Mar 2017 05:44

Re: Class Association - column name Issue

Postby Shalex » Thu 20 Apr 2017 19:02

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.
Shalex
Devart Team
 
Posts: 7344
Joined: Thu 14 Aug 2008 12:44

Re: Class Association - column name Issue

Postby RobertK » Fri 21 Apr 2017 06:01

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/Clipboardimage2017-04-21155817.png
RobertK
 
Posts: 34
Joined: Thu 02 Mar 2017 05:44

Re: Class Association - column name Issue

Postby RobertK » Fri 21 Apr 2017 06:04

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.
RobertK
 
Posts: 34
Joined: Thu 02 Mar 2017 05:44

Re: Class Association - column name Issue

Postby Shalex » Fri 21 Apr 2017 17:07

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.
Shalex
Devart Team
 
Posts: 7344
Joined: Thu 14 Aug 2008 12:44


Return to Entity Developer