I have a CategoryDAO which I want to use to create a datatable, however the SQL expression I am creating is like so;
select b.Category
from
categories a inner join products p on a.CatId = p.CatId
inner join categories b on a.catpath like b.catpath
forget the query for now, but notice that I want to select a field from the second use of the category table. I can do this if I create a dynamic list by setting the fields entityalias. However if I create a dynamic list I am basically recreating my category fields which seems an extra step and also prone to error due to the use of strings as field names
e.g. fields.DefineField(CategoryFields.CategoryId, 0, "CategoryId", "b");
What I would ike is to just use the CategoryDAO in the first place but somehow specify that it use an entity alias for its fields.
Is this possible?
Thanks,
Darren.