Closed klaudiusz223 closed 11 years ago
It's an unfortunate side effect of applying #79 and it only happens when the model is not property configured (i.e. missing an axis).
It not only happens with levels, but you can reproduce it with measures too. So first, I'll change the title appropriately.
The problem is caused by the fact that you have no idea what members or levels are present in an axis before you have a query result.
It's not a problem with Olap4J's query model (i.e. Saiku) as it keeps all user selections in memory. However, such models have disadvantages when it comes to support user MDX as there's no clear way to merge or switch between query models.
On the other hand, JPivot builds the query model for not user's selection, but for MDX parse tree, which enables it to simultaneously support grid view and MDX editor, however it cannot track selections without query result so causing problems such as this.
Before #79, we had a valid model even when both the axes are empty as it places an empty sets there.
I believe it could be somehow dealt with implementing #92 in particular way, of which I'll explain the possible approach there.
I believe we need to do it before 0.8 release, even without considering #92, as now it's rather confusing for users.
At the very least, if there's no easy way to do it, we should inform users they need to fill all the axes before they could select other levels or members.
Applied sort of a middle-of-the-road workaround for this problem. Namely, use empty sets like before fixing #79, for all cases except when the XML/A Mondrian driver is used, and for that case try to guess what members are present from the parse tree.
This guess work will not work correctly for many corner cases, and should be considered as an workaround till #92 is properly implemented.
However, such a failure in resolving members will not critically hinder usability, and it won't happen for most common cases. So, I'll just mark it as closed for now.
To reproduce incorrect behavior: