Entity Model Support

Entity Model Support

Postby teckfreak » Tue 30 Sep 2008 22:12

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.
teckfreak
 
Posts: 5
Joined: Tue 30 Sep 2008 22:04

Postby Shalex » Wed 01 Oct 2008 08:28

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

All schema in EDM wizard

Postby teckfreak » Wed 01 Oct 2008 14:01

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!!!
teckfreak
 
Posts: 5
Joined: Tue 30 Sep 2008 22:04

Postby Shalex » Thu 02 Oct 2008 08:29

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby teckfreak » Thu 02 Oct 2008 13:22

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.
teckfreak
 
Posts: 5
Joined: Tue 30 Sep 2008 22:04

Postby Shalex » Thu 02 Oct 2008 14:50

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby teckfreak » Thu 02 Oct 2008 15:58

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.
teckfreak
 
Posts: 5
Joined: Tue 30 Sep 2008 22:04

Postby cstaley » Wed 08 Oct 2008 17:11

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
cstaley
 
Posts: 3
Joined: Wed 08 Oct 2008 17:06

Postby Shalex » Thu 09 Oct 2008 07:44

The system privileges "SELECT ANY TABLE" and "EXECUTE ANY PROCEDURE" will be supported in the nearest future.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby cstaley » Thu 09 Oct 2008 12:29

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?
cstaley
 
Posts: 3
Joined: Wed 08 Oct 2008 17:06

Postby Shalex » Thu 09 Oct 2008 14:07

We are going to support roles also.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle