[Mondrian] uniqueMembers attribute in XML schema not worked for second level and deeper ones

mehdi b mehdi_xinu at yahoo.com
Sun Mar 4 10:02:49 EST 2012


Hi

I'm using mondrian version 3.2.1.13885. When I execute an MDX query, I want to check the uniqueness of all members of the associated level on the selected member. So I called the following API:

member.getLevel().areMembersUnique()

The implementation of the method areMembersUnique() in the mondrian.rolap.RolapLevel class is:
    public boolean areMembersUnique() {
        return (depth == 0) || (depth == 1) && hierarchy.hasAll();
    }


So, it seems for every multi-level dimension the areMembersUnique() returns false for second level and deeper ones in spite of the uniqueMembers attribute in the XML schema. It means the uniqueMembers attribute in the XML schema is ignored. Although uniqueMembers is set to true for both City and Branch levels in the following example, areMembersUnique() returnes false for aforementioned levels:

    <Dimension name="Branch">
        <Hierarchy primaryKey="BRANCH_ID" hasAll="true" allMemberName="All">
            <Table schema="BIDWH" name="COR_DM_BRANCH"/>

            <Level name="State" column="STATE_ID" captionColumn="STATE_NAME" uniqueMembers="true" type="Integer" />
            <Level name="City" column="CITY_ID" captionColumn="CITY_NAME" uniqueMembers="true" type="Integer" />
            <Level name="Branch" column="BRANCH_ID" captionColumn="BRANCH_NAME" uniqueMembers="true" type="Integer" />
        </Hierarchy>
    </Dimension>



So I want to know how can I read the real value assigned in the uniqueMembers of XML schema for any level of dimensions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120304/214bb9fb/attachment.html 


More information about the Mondrian mailing list