tags:

views:

17

answers:

1

Hi

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

A: 

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

Diego Mijelshon
That's fine. how do i specify the order of the list in the database and collection?
Phil Whittaker
a list has a <list-index/> element, which maps the element's index in the list to a db column.
Diego Mijelshon