Skip to content

Commit 7e7b883

Browse files
committed
level names consistent with SsasCompatibleNaming=true
1 parent 39cf903 commit 7e7b883

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/mondrian_rest/query_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ def build_query(cube, options={})
184184

185185
case cut[:type]
186186
when :member
187-
"DESCENDANTS(#{cut[:cut]}, #{qa.full_name})"
187+
"DESCENDANTS(#{cut[:cut]}, #{qa.unique_name})"
188188
when :set
189189
# TODO
190190
"{" + cut[:set_members].map { |m|
191-
"DESCENDANTS(#{m.full_name}, #{qa.full_name})"
191+
"DESCENDANTS(#{m.full_name}, #{qa.unique_name})"
192192
}.join(",") + "}"
193193
when :range
194194
# TODO

spec/query_builder_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def error!(*args)
117117
'measures' => ['Unit Sales']
118118
})
119119

120-
expect(q.to_mdx).to eq("SELECT {[Measures].[Unit Sales]} ON COLUMNS,\nDESCENDANTS(Product.Product Family.Drink, [Product].[Product Category]) ON ROWS\nFROM [Sales]")
120+
expect(q.to_mdx).to eq("SELECT {[Measures].[Unit Sales]} ON COLUMNS,\nDESCENDANTS(Product.Product Family.Drink, [Product].[Product].[Product Category]) ON ROWS\nFROM [Sales]")
121121
end
122122

123123

0 commit comments

Comments
 (0)