Navigation properties not generated from Postgresql db

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
etienne.desgagne
Posts: 3
Joined: Fri 12 Oct 2012 14:50

Navigation properties not generated from Postgresql db

Post by etienne.desgagne » Fri 12 Oct 2012 14:52

Hi,
When generating model from my postgresql database, all tables are generated but not the navigation properties. Also, all not nullable fields are generated as entity keys.

Is it a bug or a bad configuration?

Thanks

Etienne

etienne.desgagne
Posts: 3
Joined: Fri 12 Oct 2012 14:50

Re: Navigation properties not generated from Postgresql db

Post by etienne.desgagne » Sun 14 Oct 2012 13:12

It seems that some privileges are missing in database... It strange that no error are raised or that tables can be read from database but not the relations...

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Navigation properties not generated from Postgresql db

Post by MariiaI » Mon 15 Oct 2012 09:12

We have reproduced the issues with missing navigation properties and setting up the not nullable fields as entity keys. It is indeed associated with user privileges in PostgreSQL. We will investigate it and inform you about the results as soon as possible.

As for the issue with missing tables in the wizard when creating ADO.NET Entity Data Model (you wrote about it via the mail), obtaining the metadata in ADO.NET Entity Data Model Wizard is implemented mainly through the 'information_schema', while in Entity Developer it is implemented with 'pg_catalog'. Thus, there can be differences in their behavior.
However, this issue also seems to be related to user privileges. We will investigate this behavior and inform you about the results as soon as possible.

etienne.desgagne
Posts: 3
Joined: Fri 12 Oct 2012 14:50

Re: Navigation properties not generated from Postgresql db

Post by etienne.desgagne » Mon 15 Oct 2012 13:43

After some investigation it seems that the database user I was using to access dabatase from Entity Framework was missing the INHERIT attribute. Without this attribute the user was not inheriting from his group privileges that give him access to database objects...

Everything is working well now.

Thanks for your support

Etienne

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Navigation properties not generated from Postgresql db

Post by MariiaI » Mon 05 Nov 2012 07:13

The bug with incorrect model creating and wrong generation of the associations and entity keys when working for users with limited privileges is fixed. The fix is available in the new build of dotConnect for PostgreSQL 6.2.114. It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information please refer to http://forums.devart.com/viewtopic.php?f=3&t=25196

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Navigation properties not generated from Postgresql db

Post by Shalex » Thu 15 Nov 2012 16:15

The bug with retrieving metadata information about primary keys in ADO.NET Entity Data Model/LightSwitch when using database user with limited privileges is fixed in the current (6.2.122) build of dotConnect for PostgreSQL. Please try it and notify us about the results.

Post Reply