Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

"SQLite Error 1: 'no such column" exception with EFc5 #288

Description

@pas059

Hi,

using EFc5 with EF Designer 3.0.6, i noticed incoherencies in the generated code during call to HasForeignKey().
For instance, if a entity Profession has an identity property ProfessionId, and if a entity Patient has a navigation property Profession to Profession entity, the code generated in OnModelCreating() contains line like:
modelBuilder. ... .HasForeignKey("ProfessionProfessionId");
but the corresponding column in the database table Patient is named 'Profession_ProfessionId'.
With previous versions (EFc 3.1 or EF Designer ??) the code generated in OnModelCreating() contains line like:
modelBuilder. ... .HasForeignKey("Profession_ProfessionId");

Consequently, all queries implying Patient and its navigation property Profession, fail by fire an exception telling "SQLite Error 1: 'no such column: p.ProfessionProfessionId'".

Any idea?
regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions