Page 1 of 1

Entity Model Support

Posted: Tue 30 Sep 2008 22:12
by teckfreak
Hi,
I am trying to create a Entity Data Model using the OraDirect.NET Data provider. I am able to access the Oracle data base sucessfully. However the entity class does not get created in any of the following scenarios
1. When I try to drag and drop a Table from the Schema Explorer, it does not create an entity in the Model.
2. I even tried installing OraDeveloper Tools and tried with the Data base explorer that comes with the Tools. It takes some time and does not create the entity class
3. I also tried the option "Update Model From Database" from the Model Browser window. Even then it does not create an entity.
Please guide me how to proceed.

Posted: Wed 01 Oct 2008 08:28
by Shalex
We recommend you to create the model using EDM Wizard. Set the additional attributes, e.g. the StoreGeneratedPattern attribute, in XML Editor. Editing of the existing model is implemented in Microsoft EDM Designer, that has some limitations and defects in Entity Framework V1. But it can be used for visual creation of the class hierarchy with abstract classes. We recommend not to use the "Update Model From Database" function at all - it is better to recreate the model using EDM Wizard.

All schema in EDM wizard

Posted: Wed 01 Oct 2008 14:01
by teckfreak
Hi,
When we use EDM wizard to generate an Entity Model using Oracle database, how do I access Tables in other schema?
It shows only the Tables in current schema. Server Explorer/Database explorer has an option of changing the View to see All objects instead of just User objects.

Thanks in Advance!!!

Posted: Thu 02 Oct 2008 08:29
by Shalex
Grant object privilege to access tables from other schemas for the user, whose account you are using when connecting to the database. In this case, these tables will be available to choose them in EDM Wizard.

Posted: Thu 02 Oct 2008 13:22
by teckfreak
The account used for connecting the database has Privileges to access Tables from other schema. But the Tables are not listed there.
When the same connection is made through Server explorer, upon changing the View from User objects to All objects, I am able to access other schema tables. It is not enlisted in Entity Wizard.

Posted: Thu 02 Oct 2008 14:50
by Shalex
Currently only additional tables/views, for which the user has GRANT SELECT, are reflected in EDM Wizard. The system privelege SELECT ANY TABLE is not supported.

Posted: Thu 02 Oct 2008 15:58
by teckfreak
Thanks Shalex for the information
Digging through the Privileges, I found that the account was having
1. Grant Select privilege through a Role
2. Select Any Table privilege

Are the Tables not appearing because Grant Select privilege is guarenteed through a Role and not directly to the user ?

or

Are the Tables not appearing because "Select Any Table" is guarenteed along with "Grant Select" privilege. This means that the account should not have "Select Any Table" privilege even if it has "Grant Select" on a Table.

Posted: Wed 08 Oct 2008 17:11
by cstaley
Teckfreak,
Yes, it looks like privileges assigned via roles are not being honored. I was having the same problem, and as soon as our DBA granted my user account select access directly, I was able to see the objects from the other schemas.

Shalex,
This looks like a nice little "feature" that needs to be fixed... I mean added. :D

chris

Posted: Thu 09 Oct 2008 07:44
by Shalex
The system privileges "SELECT ANY TABLE" and "EXECUTE ANY PROCEDURE" will be supported in the nearest future.

Posted: Thu 09 Oct 2008 12:29
by cstaley
Sounds good. However, it would appear that the root problem that Teckfreak and I are experiencing is that the provider is not honoring privileges assigned through roles. It seems to be only looking at the privileges assigned directly to the user account itself.

So for example, my account is in Role1, which has select privileges to all of the tables in Schema1. My account has no privileges itself. When I run the EDM wizard, I do not see any of the tables in Schema1. If my account is assigned select privileges directly, I can now see the tables.

Can you confirm if this is something that would be added in the future?

Posted: Thu 09 Oct 2008 14:07
by Shalex
We are going to support roles also.