Page 1 of 1

warning 6002: The table/view no primary key

Posted: Tue 15 Jun 2010 19:48
by tzi
Dear Community,

edit: Using Vs2008 SP1, latest dotConnect for Postgresql, latest Postgresql DB (8.4.4) running on Win7

I have got serious issues with dotconnect for Postgresql. I tried a simple example, generating an EF Model from a database with a single table:

CREATE TABLE manufacturers
(
manufacturerid smallint NOT NULL,
manufacturername character varying(125) NOT NULL,
CONSTRAINT manufacturers_pkey PRIMARY KEY (manufacturerid)
)
WITH (
OIDS=FALSE
);


The resulting code in the model (model1.edmx) is:


SELECT
manufacturers.manufacturerid AS manufacturerid,
manufacturers.manufacturername AS manufacturername
FROM public.manufacturers AS manufacturers


Further I find the following error:
warning 6002: The table/view 'mydb.public.manufacturers' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.


Seems that the EF generator is unable to find my primary key and therefore generates a view rather then a table. Any inserts or updates using the EF objects subsequently failes.

Any ideas whats wrong?
Thanks!

Posted: Wed 16 Jun 2010 10:59
by AndreyR
The problem seems to be associated with the server version. We are investigating it.
Is the problem reproducible using Entity Developer (try to add Devart Entity model to your project)?

Posted: Wed 16 Jun 2010 11:30
by tzi
Hi!

Thank you for your answer, I will try to reproduce the issue with your Entity Designer instead of the VS2008 one.

However, which PostgreSQL server Version do you recommend to use?

Thanks, Tom

Posted: Wed 16 Jun 2010 16:41
by tzi
Hi!

The Devart ED did his job quite nice, some FKs werent recognized correctly (due to some datatype issues on the DB).

But, whats the issue with VS2008 ED?

Yours, Tom

Posted: Tue 22 Jun 2010 10:12
by AndreyR
I have requested some information with the help of e-mail that you have provided in your forum profile.