Visual Studio Lightswitch Issue

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
mikeyv
Posts: 3
Joined: Mon 03 Dec 2012 16:15

Visual Studio Lightswitch Issue

Post by mikeyv » Mon 03 Dec 2012 16:17

When trying to create a model from the database - I get the following error in a Lightswitch (C#) project.

"The table '' is referenced by a relationship, but cannot be found."

Not very helpful, and also strange considering in a regular EF project in visual studio it pulls in the schema just fine. Is there any way to find more information about this error?

mikeyv
Posts: 3
Joined: Mon 03 Dec 2012 16:15

Re: Visual Studio Lightswitch Issue

Post by mikeyv » Mon 03 Dec 2012 16:18

Also wanted to add that I am using the very latest version of dotConnect for PostgreSQL (professional version).

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

Re: Visual Studio Lightswitch Issue

Post by Shalex » Wed 05 Dec 2012 08:56

Are you getting error 2039? This error occurs if two tables in the database are linked with each other in the following way:
Table1 <one-to-many> LinkingTable <many-to-one> Table2
The corresponing result of the LightSwitch Attach Data Source Wizard conversion:
Table1 <many-to-many> Table2
This leads to error 2039.
A workaround: do not grant access to such tables to your Oracle user (do not connect as DBA, remove the privileges SELECT ANY TABLE, grant access only to objects that are intended for the model). Even if you are receiving non-2039 error, grant access only to the needed tables to your database user.

The behaviour of LightSwitch Attach Data Source Wizard is similar to the behaviour of EDM Wizard. So refer to http://www.devart.com/dotconnect/oracle ... izard.html.

mikeyv
Posts: 3
Joined: Mon 03 Dec 2012 16:15

Re: Visual Studio Lightswitch Issue

Post by mikeyv » Wed 05 Dec 2012 18:06

I'm not certain which 'error' I'm getting - as that message in the original posting doesn't specify (it also literally says '' instead of telling me which table it has a problem with). I'll try to create a user with limited access and see if that helps, and leave an update here. Thank you for your response!

Post Reply