Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Using EdmGen06 with remote PostgreSQL Database #3

Open
vladsavostin opened this issue Dec 24, 2014 · 3 comments
Open

Using EdmGen06 with remote PostgreSQL Database #3

vladsavostin opened this issue Dec 24, 2014 · 3 comments

Comments

@vladsavostin
Copy link

Hi,
I have a PostgreSQL database on remote host ant I'm trying to generate db-first model for that database. Unfortunately when I tried to use standart EdmGen by Microsoft I've obtained an error:

no pg_hba.conf entry for host:<my_address>, user , database "postgres"

(my database's name is other and was specified in connection string), SSL off. I tried to change SSL value of connection string, but it did not help.
EdmGen06 allowed me to generate .edmx, .csdl, .msl, .ssdl files, but VS could not generate classes from this files, also EdmGen inValidateArtifacts mode generates the following error messages:
error 0019: name of each item in a class EntityContainer must be unique. Element with name already defined.
When I'm trying to open .edmx in VS with ADO.NET Entity Data Model Designermore errors about multiply definition of an element appear

@kenjiuno
Copy link
Owner

Hi @vladsavostin

Thanks for trying EdmGen06. I just want to help you. Could you send me the generated edmx file from your PostgreSQL database?
It will help to understand meaning of the error "error 0019: name of each item in a class EntityContainer must be unique"

Thanks
kenji uno

@vladsavostin
Copy link
Author

Thanks!
link to edmx

https://drive.google.com/file/d/0B-VgyKFCJdE3WnB4VTBxSmhmMDA/view?usp=sharing

For example, look at this fragment:

       <Association Name="fk_wordid">
          <End Role="worddict" Type="npgsql_tests.worddict" Multiplicity="1" />
          <End Role="semanticvector" Type="npgsql_tests.semanticvector" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="worddict">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="semanticvector">
              <PropertyRef Name="wordid" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="fk_wordid">
          <End Role="worddict" Type="npgsql_tests.worddict" Multiplicity="1" />
          <End Role="sinonims" Type="npgsql_tests.sinonims" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="worddict">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="sinonims">
              <PropertyRef Name="wordid" />
            </Dependent>
          </ReferentialConstraint>
        </Association>

Two association with the same name in a row. I get error message:

Error 10001: The symbol 'npgsql_tests.fk_wordid' has already been defined.

@kenjiuno
Copy link
Owner

Hi @vladsavostin

Thanks for the detail report!
I could repro your problem, and the new release will fix it.

Please try latest 0.11:
https://github.com/kenjiuno/EdmGen06/releases

It will fix your first problem.

About your second problem (generate classes), I will need research.

Thanks
kenji uno

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants