locked
Is it possible to convert an explitet entity hierarchy from mandatory to non-mandatory? RRS feed

  • Question

  • Hi

    I have created an explicit entity hierarchy wherer I during the creation selected the checkbox "Include all leaf members in mandatory hierarchy" and created a mandatory hierarchy.

    Now I need to change the hierarchy so it to no longer contains all leaf member - but when I try to edit the hierarchy the "Include all leaf members in mandatory hierarchy" check box is grayed out. Is there some other way to alter my hierarchy?
    Or do I have to create a new non-mandatory hierarhy, stage data from the existing hierarchy into the new hierarchy, delete the old hierarchy and rename my new hierarchy to the same name as the old one had...

    /Martin

    Friday, July 1, 2011 9:36 AM

Answers

All replies

  • Hi Martin

    maybe that you could go in SQL Server Management Studio and go in mdm.tblHierarchy table and update value of field "IsMandatory" from 1 to 0 for the row corresponding to your hierarchy ?

    Regards,



    Xavier Averbouch
    Microsoft Community Contributor
    Avanade , FRANCE
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful".
    Friday, July 1, 2011 9:52 AM
  • Hi Xavier,

    It seams to be working to just change the value directly in the mdm.tblHierarchy table.

    - Web interface is still working
    - Subscription views are fine
    - Staging are working

    I just keep woundering why the setting has been disables in the front end - if there are some thing that is generated in the database (table/view/stored procedure/etc.) that also must be altered. I'm most concered about the auto generated tables

    mdm.tbl_<Model_ID>_<Entity_ID>_*

    and the views

    mdm.viw_SYSTEM_<Model_ID>_<Entity_ID>_*

     

    Do you have any insight into that those database objects are dependent upon the IsMandatory metadata column?

    /Martin

    Friday, July 1, 2011 11:09 AM
  • Hi Martin

    I don't think there is any other reference to this field anywhere else. I don't know why the checkbox stays disabled.

    I've checked in Generated tables for the hierarchy mdm.tbl_VV_EE_* and I couldn't find any relevant dependency, but maybe there are some reference elsewhere

    mdm.tbl_VV_EE_*  where VV is version ID, (* is a wildcard),  and EE is entity ID, with entity_ID you can find in tblHierarchy and Version_ID that you can find in tblModelVersion

    by the way, here are more info about generated table names :

    Name                   TableCode
    Leaf                      EN
    Consolidated          HP
    Collection              CN
    Hierarchy              HR
    Collection Member CM

    you should check if "unused" level is well present in your hierarchy members list when switching IsMandatory field to 0 

    Regards,



    Xavier Averbouch
    Microsoft Community Contributor
    Avanade , FRANCE
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful".
    Friday, July 1, 2011 1:26 PM
  • Sounds nice that a simple update in the table mdm.tblHierarchy can do the trick.

    And thanks alot for the help - I realy appreciate it.

    /Martin

    Friday, July 1, 2011 1:56 PM