This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I've done a bit of a search on previous posts, and it appears that what I want to do cannot be accomplished directly in Lightspeed, but I could be wrong. Below is the SQL query as an example, returning all Categories for a certain Supplier. If it can't be done, then I am presuming that I will need to use a stored proc or a view and do it that way ? If so, can I add my vote for joins to be included in 3.0 ?! SELECT DISTINCT C.CategoryID,C.CategoryDesc (A Product Line must have a Sub Category, every Sub Category must have a Category and evey Product Line must have a Supplier)
|
|
|
uow.Find<Category>(Entity.Attribute("Subcategories.ProductLines.SupplierId") == 1231); LightSpeed recognises a collection property path like Subcategories as a subselect over that collection (it is implemented as a subselect rather than a join but it gives you the same effect). |
|
|
Ahh, yes, I see now. I need to learn to look at the properties of the objects more closely as it's obvious now you point it out {:o) |
|