View Full Version : Mondrian JPivot : bugs with multiple hierarchies

09-07-2006, 05:46 AM

This is a bug report for bugs which happen when using several hierarchies in the same dimension and when using 2 identical dimensions with differents hierarchies.

1 - I tried to use 2 differents hierarchies in the same dimension as described on http://mondrian.sourceforge.net/schema.html.
At first, everything seems ok in JPivot : when I select the dimension, I see the 2 hierarchies and i can choose the one i want. But when I go back to this screen I get the JPivot error screen and a class cast exception in jpivot code on the console.

2 - As using 2 hierarchies was not working I tried to duplicate the dimension under a new name.

This time, I get a mondrian error when I try to display the second dimension. It seems that mondrian has detected that the dimensions were the same and used a different alias for table (mytable1 instead of mytable). The problem is that in one place (and only one) the original name is used (mytable) and the request fails.

The dimension was built using 2 joints, like in :

<Dimension name="Product" foreignKey="product_id">
<Hierarchy hasAll="true" primaryKey="product_id" primaryKeyTable="product">
<Join leftKey="product_class_key" rightAlias="product_class" rightKey="product_class_id">
<Table name="product"/>
<Join leftKey="product_type_id" rightKey="product_type_id">
<Table name="product_class"/>
<Table name="product_type"/>
<!-- Level declarations ... ->

I don't have an example that fails because I found another way to do what I wanted, but I should be able to reproduce this bug if you really need it.


Post edited by: nricheton, at: 09/07/2006 09:47