I want to specify a column of my domain object which will be of Type Product lets say. Instead of this being a normal relationhip like one to one for example or one to many etc... I want this property to be a product, but also it is the most sold product.
So if I have an Object called ProductCategory
public class ProductCategory{
public virtual Product BestSellingProduct{get;set;}
}
So my question is how can I integrate this logic into the mapping file for ProductCategory. I am not sure how the formule attribute of the property element could be used to return an object from the sql. Can HQL be used?
Andrew