Page 1 of 1

Wrong Schema Problem

Posted: Thu 23 Jan 2014 14:38
by ucelenli
I am using Devart DotConnect for Postgresql. Devart.Data.Postgresql version is 7.2.80.0
I have different schemas on a single database and I'm trying to connect to a schema called, say "test1".

My connectionstring (which I pass to the constructor of Entitites object) is as follows:

Code: Select all

metadata=res://Entity.DataModel.csdl|res://Entity.DataModel.ssdl|
res://Entity.DataModel.msl;provider=Devart.Data.PostgreSql;provider connection
 string="Server=localhost; Port=5432;User Id=xxxxxx;Database=xxxxxx;Unicode=true;
Initial Schema=test1;"
when I create the new Entities object with this connection string, I try to call db.CreateDatabase() I expect the tables to be generated on schema "test1" but it tries to create them on "public". I get an error like this;

"relation Notification already exists" CREATE TABLE public."Notification" (
"Id" bigserial NOT NULL,
"Type"
:

I used Initial Schema="test1" in the connection string but the entity object uses public schema.

Why is this happening?

Re: Wrong Schema Problem

Posted: Fri 24 Jan 2014 13:57
by Shalex
Seems like your Notification table has the "Schema=public" attribute in SSDL (Store) part of the model. You should clear the Schema value in design-time with Entity Developer (or with XML Editor in case of EDM Designer).