separate the db table structure according the to the class library

4 posts, 0 answers
  1. Håkan
    Håkan avatar
    29 posts
    Member since:
    Apr 2012

    Posted 06 Aug 2012 Link to this post

    Hi All,

    If we create a table using openaccess, always the user is “dbo”.

    Ex:
    if we create a table called “customer” then db will appear  as dbo.customer

    We need to separate the db table structure according the to the   class library that we are using

    For ex: 

    “Authentication”  class library there is a table called “Role_Type” and  “Warehouse” class library there is a  table called “Warehouse_Type”

    In DB we need the table separation like.

    Authentication. Role_Type

    Warehouse. Warehouse_Type

    How can we do this using openAccess.


    Development Team

  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 08 Aug 2012 Link to this post

    Hello Håkan,

     You can specify the schema name for a table so that the tables are created in separate schemas. You can do this in the 'Table editor' (right click a class and select 'Edit Table') or you can open the 'Model Schema Explorer' ( View->Other Windows->Model Schema Explorer), select the table in the 'Tables' folder, press F4 to open 'Properties' window and change the schema name there.

    At the moment there is no way to specify the schema name for a bunch of tables but this is something we have already added to our list.

    Do get back in case you need further assistance.

    Regards,
    Ady
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  3. DevCraft banner
  4. Håkan
    Håkan avatar
    29 posts
    Member since:
    Apr 2012

    Posted 10 Aug 2012 Link to this post

    Hi


    we forgot to tell that we use CODE FIRST METHOD  to create table.In this case how can we separate the Schema


    Development Team 
  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 10 Aug 2012 Link to this post

    Hi Håkan,,

     It does not matter which approach you use, you can still specify the schema name the way I previously mentioned. In case you have not explicitly mapped your classes to tables, please select each class in the designer, right click and select 'Map to table'. This will map the class to a table and show the table definition in a dialog. Click 'Ok' to accept this default mapping.
    You can then follow the steps mentioned previously to specify the schema name.
    Once again, we are aware of the usability issues to perform this operation in a single step and we have already added that to your list.

    Do get back in case you need further assistance.

    All the best,
    Ady
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Back to Top