Hi, i'm having a problem with Mondrian's parent-child hierarchies. In a parent-child hierachy if we don't specify a Closure Element the results obtained from Mondrian are different on each version. Tested with Mondrian
2.1.1, 2.2.2 and 2.3.2.8944 (Foodmart.xml - with the Dimension "Employees" from "HR" Cube).<br><br>---------------------------------------------------------------------------------------------------------------------
<br><Dimension name="Employees" foreignKey="employee_id"><br>
<Hierarchy hasAll="true" allMemberName="All Employees" primaryKey="employee_id"><br>
<Table name="employee"/><br>
<Level name="Employee Id" type="Numeric" uniqueMembers="true" column="employee_id" parentColumn="supervisor_id" nameColumn="full_name" nullParentValue="0">
<br>
<!--<br> <Closure parentColumn="supervisor_id" childColumn="employee_id"><br> <Table name="employee_closure"/><br> </Closure><br>
--><br>
<Property name="Marital Status" column="marital_status"/><br>
<Property name="Position Title" column="position_title"/><br>
<Property name="Gender" column="gender"/><br>
<Property name="Salary" column="salary"/><br>
<Property name="Education Level" column="education_level"/><br>
<Property name="Management Role" column="management_role"/><br>
</Level><br>
</Hierarchy><br>
</Dimension><br>---------------------------------------------------------------------------------------------------------------------<br><br>With this JAVA code :<br>---------------------------------------------------------------------------------------------------------------------
<br>import mondrian.olap.*;<br>import java.io.PrintWriter;<br><br>public class MondrianCCATest {<br><br> public static void main(String[] args) {<br> String jdbcUrl = "jdbc:mysql://localhost:3306/foodmart";
<br> String jdbcUser = "foodmart";<br> String jdbcPass = "foodmart";<br><br> String connectionString = "Provider=mondrian; Locale=pt_PT; Jdbc=" + jdbcUrl + "; JdbcUser=" + jdbcUser + "; JdbcPassword=" + jdbcPass
<br> + "; Catalog=file:FoodMart.xml;";<br><br> Connection connection = DriverManager.getConnection(connectionString, null, false);<br> Query query = connection.parseQuery("SELECT {[Measures].[Org Salary]} on columns," + " {[Employees].[All Employees].[Sheri Nowmer].children} on rows "
<br> + "FROM [HR] ");<br> Result result = connection.execute(query);<br> Position[] positions = result.getAxes()[1].positions;<br> <br> try {<br> result.print
(new PrintWriter("mondrian.html"));<br> } catch (Exception e) {<br> e.printStackTrace();<br> }<br> }<br>}<br>---------------------------------------------------------------------------------------------------------------------
<br><br>With Mondrian 2.1.1 I get the list of members correctly :<br>- Derrick Whelply<br>- Michael Spence<br>- Maya Gutierrez<br>- Roberta Damstra<br>- Rebecca Kanagaki<br>- Darren Stanz<br>- Donna Arnold<br><br>But with Mondrian
2.2.2 and 2.3.2.8944 I get an empty result. Should I log a bug request with this information ?<br><br>Thank you for your time.<br><br>Best Regards,<br><br>-- <br>Eduardo Andrade<br><a href="mailto:eduardofandrade@gmail.com">
eduardofandrade@gmail.com</a>