mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Use unique name instead of object itself when comparing between metadata elements. #46

Closed mysticfall closed 11 years ago

mysticfall commented 11 years ago

Found a very subtle problem with Mondrian's DelegatingRole, that when it wraps RolapMember instance into RolapHierarchy$LimitedRollupMember, they no longer return true when equals() method is invoked with the other as an argument, which could make various parts of Pivot4J not functioning properly.

So, it would be safe to compare between unique name properties of members instead of the member objects themselves to prevent such a problem.

mysticfall commented 11 years ago

I'll change the relevant code to be as defensive as possible. Though it's not viable to change all the cases like checking for .contains() on List of members without making codebase a mess, so the full resolution would be possible when below issue is addressed from Mondrian project:

http://jira.pentaho.com/browse/MONDRIAN-781?focusedCommentId=138035#comment-138035