Page 1 of 1

Long names of properties (Entity Framework)

Posted: Sun 17 Jun 2018 06:00
by msirkovsky
Hi I am evaluating the dotConnect for Oracle - Entity Framework and I encountered a problem with long names of class properties(resp. column names)

I have this class and table:

Code: Select all

public class TestTable {
   public Guid Id { get; set; }
   public Guid LongerNameThanEFCanHandle1234567
}
I call:

Code: Select all

Db dbContext = CreateDbContext();
dbContext.Set<TestTable>.Load();
The query that EF generates:

Code: Select all

SELECT 
Extent1.ID,
Extent1.R1,
FROM TESTTABLE Extent1
Column "LongerNameThanEFCanHandle1234567" is named as R1.

Is there some limitation for length of column?

Thank you

Re: Long names of properties (Entity Framework)

Posted: Tue 19 Jun 2018 17:23
by Shalex
The names of columns are generated by EF engine basing on class properties names.
Be aware that EF6 allows to set custom conventions via OnModelCreating (like the one described at https://www.devart.com/dotconnect/oracl ... olean.html) where you could specify the column name basing on your algorithm.
msirkovsky wrote: Sun 17 Jun 2018 06:00Is there some limitation for length of column?
Yes, there is: 128 symbols in Oracle 12R2 and 30 symbols in Oracle 12R1 and below.