Long aliases are generated in WHERE clause
------------------------------------------

                 Key: DNET-877
                 URL: http://tracker.firebirdsql.org/browse/DNET-877
             Project: .NET Data provider
          Issue Type: Bug
          Components: Entity Framework Core
    Affects Versions: 6.6.0.0
            Reporter: Pavel
            Assignee: Jiri Cincura


When access to condition column passes through several tables, for the joined 
tables generated a very long alias.
And I get FirebirdSql.Data.FirebirdClient.FbException: "Dynamic SQL Error Name 
longer than database column size"

Example
class Table1
{
    int id
    int value
    int idTable2
    [ForeignKey("idTable2")]
    Table2 table2
}
class Table2
{
    int id
    int idTable3
    [ForeignKey("idTable3")]
    Table3 table3
}
class Table3
{
    int id
    bool condition
}

When i do:
var result = Table1.where(t => t.table2.table3.condition).select(t => value)

generates query:

SELECT
   "t"." value"
FROM
    Table1 AS "t"
    LEFT JOIN Table2 AS "t.Table2" ON "t"."idTable2" = "t.Table2"."id"
    LEFT JOIN Table3 AS "t.Table2.Table3" ON "t.Table2"."IdTable3" = 
"t.Table2.Table3"."id"
WHERE
    "t.Table2.Table3"."condition"



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to