[Mondrian] RE: Looking up members by key

Julian Hyde julianhyde at speakeasy.net
Tue May 29 13:54:53 EDT 2007

Javier wrote:
> I have one question that might need to be solved in order to complete
our ad-hoc security.
> Is there any way to get a member of any level using the internal code
instead of the name? 

> For example instead of using [Month].[February], [Month].[M2]...?

Julian wrote:
MDX supports the syntax '[Time].[1997].&[4]' where the '&' means get the
member with the key 4 rather than the name 4.


This is partly supported in mondrian. Try it - it might work.


We already tried it (because we saw it in the forums) and it didn’t
work. We will though try it again. 


I suspected it wouldn't work, because it hasn't been tested/used. Oh
well. Maybe you could fix it!?
There is a method MemberSource.lookupMember(String[], boolean), which
calls RolapUtil.lookupMemberInternal. You need to generalize that to
lookupMember(Id.Segment[], boolean).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070529/e8016083/attachment.html 

More information about the Mondrian mailing list