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
|
Hi, Just a quick question in regards to query projections. Would it be possible if given say an Order object which also contains a ref to an Employee object to construct a projection that would include fields from Order and from Employee. Currently when I try this LS complains of any fields referenced on the Employee object as not being found in the Order object. This type of projection would be verify useful for grid population. Thanks again, Kavan |
|
|
Hi Again, Any traction on this one? Thanks, Kavan |
|
|
Hi Kavan, This type of projection is currently not supported by LightSpeed as it requires joins. Your best bet would be to eager load the graph and then "flatten" the data into the shape you require. Going forward, we may end up supporting more complex projections as part of our LINQ implementation. Cheers, Andrew. |
|
|
Hi Andrew, Any ballpark timeframe for LINQ support? Thanks again, Kavan |
|
|
Hi Kavan, There is no fixed date for the LINQ support however we are aiming to include it as part of LightSpeed 2.0 (which also has no fixed date at this time). Thanks for the interest in seeing LINQ support however. Cheers, John-Daniel |
|
|
Is this possible now with projection. I need to populate grid from 3 tables which are related between them. i have Member which have MemberProfile WhichHave Address Is there a way to get data from all three tables in one row using LS? |
|
|
This is not directly possible: the rule in LightSpeed is that there is a one-to-one correspondence between entity types and tables. Even projections are relative to an entity type and are therefore subject to this rule. This leaves you with a couple of options: 1. Use eager-loaded associations to load all the required entities. (You can use lazy-loaded properties to avoid downloading expensive fields if this is a concern.) Then extract the data required for the grid manually or using a LINQ to Objects query. 2. Create a database view that contains the required joined data, and perform your projection against this. (In current nightly builds you can also use a stored procedure for this, but sprocs are not supported in the 2.1 stable release.) |
|
|
:( it would be great if we can do something like Projecetion.Add("TableName.ColumName") |
|