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
|
A LINQ statement which takes a single item throws an exception when calling Single() but works when calling First(). (using MySQL) This behaviour changed sometime between LS2 and LS 3.11 and remains in the June 13th nightly. It can be worked around easily enough but it would be good to get it fixed sometime in case it catches anyone else unaware and that will again allow us to use the more accurate "Single" semantics. For example: (from s in DerivedARKiveSpecies select s.RelativeURL).Take(1).Single(); results in this SQL: SELECT Thanks, Chris |
|
|
Yes, the implementation for Single adjusts the page size to 2, Ive added a check to avoid this if there is already a page size of 1 set on the query. This will be available in the next nightly build. FYI - This would have likely changed with LightSpeed 3 as we undertook a major update of the LINQ provider with the v3 release.
Thanks! Jeremy |
|
|
Thanks Jeremy, that's done the trick. |
|