Support for Synonyms

10 posts, 1 answers
  1. Carlos Sesma
    Carlos Sesma avatar
    29 posts
    Member since:
    Dec 2008

    Posted 09 Jun 2010 Link to this post

    I'd like to use reverse mapping for Synonyms in Oracle.

    Currently access to the db schema is restricted, dba manage rights by creating synonyms, so, i cant see any information about tables, views, sp, other than the synonyms list,that is not being pulled by the OpenAccess wizard and i cannot generate the persistent classes.

    regards.

  2. Answer
    Ady
    Admin
    Ady avatar
    588 posts

    Posted 14 Jun 2010 Link to this post

    Hi CARLOS SESMA,

    At the moment we are not reading the oracle synonyms. We will look into it. As a workaround you could have a database where the tables have the synonym names which you can then reverse engineer using the wizard, to generate the classes. You can then switch the connection string to your original database for the runtime. During runtime the generated sql will work for the synonyms as well. I know it is some work but maybe your tools supports something like that.

    Sincerely yours,
    Ady
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Carlos Sesma
    Carlos Sesma avatar
    29 posts
    Member since:
    Dec 2008

    Posted 14 Jun 2010 Link to this post

    thank you , thats a very good idea,
    I also noticed that,using the oracle tools for vs,  even that I'm not the dba, I was able to see the dba schema into the oracle panel.
    could it be possible to do the same in OpenAccess?, that way if i am able to see others schemas, i dont need access to synonyms anymore.
    Regards.
    *note:by default openaccess only allows me to see my own schema.



  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 16 Jun 2010 Link to this post

    Hi CARLOS SESMA,

     It is possible to reverse map tables from other schemas. In the 'Options' dialog, in the wizard, you can select the desired schemas under the 'Schemata' section.

    You will need to use the 'Merge' feature to read objects from the newly added schema(s).

    Greetings,
    Ady
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Carlos Sesma
    Carlos Sesma avatar
    29 posts
    Member since:
    Dec 2008

    Posted 18 Jun 2010 Link to this post

    thank you for your answer
     as i put in the *note, for some reason the wizard doesn't allow me to add more schema's than my own.

    as you can see in the picture, on the left panel, the connection tree shows two schema's, MARTDBA and MARTUSER.
    same connection settings are being used for the "enable openaccess" wizard. despite that, only default schema is available at schemata dialog.

    regards.




  7. Carlos Sesma
    Carlos Sesma avatar
    29 posts
    Member since:
    Dec 2008

    Posted 18 Jun 2010 Link to this post

    i know this has nothing to do with synonyms. ill open a new thread for the next reply.

    regards.

  8. Carlos Sesma
    Carlos Sesma avatar
    29 posts
    Member since:
    Dec 2008

    Posted 18 Jun 2010 Link to this post

    I took the example provided in
    edited to use the schema I wanted to see and it works.

    thank you.

    <?xml version="1.0" encoding="UTF-8"?> 
    <openaccess> 
        <classGenerator defaultPackageName="ConsoleApplication1"
            <tables/> 
            <views/> 
            <procedures/> 
        </classGenerator> 
        <options> 
            <general mapTables="True" mapViews="False" /> 
            <sourcegeneration partial="True" /> 
            <allSchemata> 
                <schemata name="MARTDBA" /> 
            </allSchemata> 
            <usedSchemata> 
                <schemata name="MARTDBA" /> 
            </usedSchemata> 
            <mapping> 
                <identity explicitIDClass="False" /> 
                <class generateFKIDField="True" generateVersionField="True" /> 
                <procedure insert="False" update="False" delete="False" /> 
            </mapping> 
        </options> 
    </openaccess> 

  9. Ady
    Admin
    Ady avatar
    588 posts

    Posted 21 Jun 2010 Link to this post

    Hello Carlos Sesma,

     I'm glad that this workaround worked for you. Does the 'MARTDBA' schema contain tables or only stored procedures? We have tested the scenario you mentioned and it works as expected i.e I can see the various non-default schemas. Does the 'MARTUSER' have access to objects in the 'MARTDBA' schema?

    Regards,
    Ady
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Carlos Sesma
    Carlos Sesma avatar
    29 posts
    Member since:
    Dec 2008

    Posted 21 Jun 2010 Link to this post


    MARTDBA schema contains everything, SP, tables, vies, sequences, etc.
    MARTUSER have access to all views and tables, execute all SP, and get sequence number, etc. from MARTDBA schema,
    the only thing it cant do is delete or create objects.
    MARTUSER rights are given through synonyms. thats why i cant see anything besides synonyms in MARTUSER schema.

    Through this workaround i can see in openaccess exactly the same objects as using Oracle developer tools Treeview. (tables,views,sp) from MARTDBA that is what i was expecting.

    *note:im using oracle 9i.

    regards.
  11. Ady
    Admin
    Ady avatar
    588 posts

    Posted 22 Jun 2010 Link to this post

    Hello Carlos Sesma,

     Thank you for the input. I will look into this case where all the rights are managed via synonyms. Your Telerik points have been updated.

    All the best,
    Ady
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner