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
|
Say I have the following tables as well as the matching LightSpeed entities: I have a query like: When I run this query I get an exception that SelectMany is not supported. |
|
|
Hi Todd, We're still rounding out our LINQ support and SelectMany is high on our list. However, your query is able to be expressed using a normal LightSpeed query: var query = new Query(Entity.Attribute("Orders.Product.Name") == "Rum") {Distinct = true}; Cheers, Andrew. |
|
|
Hi Todd, We have now added experimental support for SelectMany. This does not cover all possible SelectMany scenarios, but it should deal with queries of the type you describe (flattening queries without multi-table projections or sub-expressions (let clauses)). We would welcome feedback on whether it is sufficient for your needs. This feature will be included in nightly builds numbered 20080626 and above, available from http://www.mindscape.co.nz/Products/LightSpeed/nightlybuilds.aspx (Express edition) or the store (Standard and higher editions) from about 1800 GMT. |
|
|
Ivan, I've downloaded both the 20080626 and 20080627 build to test out SelectMany and get the same exception with both. Here is a callstack from a simple Program that uses SelectMany. Unhandled Exception: System.TypeLoadException: Could not load type 'Mindscape.LightSpeed.Model.TypeModel' from assembly 'Mindscape.LightSpeed, Version
|
|
|
Hello Todd, We've tracked this down to an obfuscation issue. We're sorry for the error. The problem will be fixed in nightly builds numbered 20080701 and above, available from http://www.mindscape.co.nz/Products/LightSpeed/nightlybuilds.aspx (Express edition) or the store (Standard and higher edition) from about 1800 GMT. Thanks for your patience and apologies again for this mistake. |
|
|
Ivan, Looks like from my initial tests SelectMany is working. I'll let you know if I run into any more issues. -Todd |
|