Order By in nhibernate column mapping - nhibernate

I have a parent - child node pattern the parent node has a collection of children nodes. The nodes have a property of position for ordering. I use this position property in my mapping file to order by. This works ok until I come to eager load the children which creates an left outer join and the position column is then ambigous. I have tried just adding Children.Position to the order by statement and this creates an error of unknown bound column. If there any way to specify this column?
Thanks

You'll have better luck by using an indexed collection (<list/>).

Related

How can I filter nodes by property values and labels in using Cypher query?

I'm trying to use Cypher to perform a graph search that includes node filtering based on property values and label constraints. I want to find all nodes with a name property that starts with "Mc" and is labeled as Manufacturer.
I've tried the following code:
MATCH (n:Manufacturer)
WHERE n.name "Mc*"
RETURN n;
Use the STARTS WITH clause with WHERE condition:
WHERE n.name STARTS WITH 'Mc'
Everthing else remains the same in your query.

how to write Derived columns as a group from a view in SQL

I have a view table called Item with column names as shown below:
I want to create parameters that groups the columns in Levels that will cascade parameter from top level to next level before reaching to the column name level.
To illustrate this, see screenshot below:
Level1 is the top level when any value is selected in it parameter then Level2 appears and another selection is made before reaching Column Name level.
How can I use my Item view to generate sql script to achieve my goal is Power BI paginated report?
I have tried using CTE but didn't get it.
Any help will be appreciated.
The only way to achieve this is to create a parameter for each column. You can then use the value selected in the parent parameter as parameter for the dataset of the second one.
The #Level1 parameter will be a query parameter for the #Level2 and the #Level2 parameter will be a query parameter for the #ColumnName.
The parameter list values will update automatically based on the user's selection.

Table row expansion with same column schema

I have a el-table with no row expansion supported currently. Depending on if the row has a particular object in it, I wish to provide a feature to support its row expansion.
The parent row object and child row object have exact data structure as shown in the figure but a different child id and I am trying to fit it in the same table:
I tried to follow this (table 1 here) but for some reason it doesn't work. I added
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">:
https://codepen.io/pen/
It would be great to understand how this works.

SSAS Dimension Grouping

I am having problem trying to group my dimension by the year using SSAS. This is the first time for me deploying a cube. Is there any way so that I can simply group the year rather than seeing multiple lines of the same year (please see the attached image)
Check the KeyColumn property of the attribute GL Year, if the value of the Key is equal, they'd be automatically grouped. What you see in the list is the NameColumn property.
More info on MSDN and on MSSQLTips.
Update:
For KeyColumns property, MSDN states:
Contains the column or columns that represent the key for the attribute, which is the column in the underlying relational table in the data source view to which the attribute is bound.
This means whenever the value of the column(s) specified in this property are equal in the underlying table for any number of rows, SSAS will treat all these rows as one Member.
In your example, say if you have a column GLYear in your relational table and in KeyColumns property you have specified the same column, the resultant list in your screenshot will have a single value for each year. Hence, all rows with value 2015 will be combined together to form a single member in that list.

BigQuery position function for element within a nested element

How do I get the position for a field nested in multiple level of records:
select position(repeatedRec.rec1.field)
where repeatedRec is a repeated record, and rec1 is a non-repeated record? Assume that repeatedRec doesn't have any other leaves. I need to know what is repeatedRec position for the element in which rec1.field resides.
This doesn't seem to work, and all I get is 1 (as if the system is treating the field as a non repeated field).
have you tried
select position(repeatedRec.rec1.field) WHITHIN repeatedRec.rec1 as f1
https://developers.google.com/bigquery/docs/data#within
see this link for a small documentation on within