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, basically we stumbled upon another deletion problem with LightSpeed. I tried to strip down the problem but the example will not execute with the following exception: "Das Objekt des Typs \"Mindscape.LightSpeed.Querying.IdentifierExpression\" kann nicht in Typ \"Mindscape.LightSpeed.Querying.LiteralExpression\" umgewandelt werden." I sent you the sources. There you will find something like this: Lo l1 = uow.Los.Where(l => l.Value == "1").First(); The bold part seems to cause the problem. If I remove it everything runs fine. The deletion problem: As stated above: In the original code this bold query works fine. The weird thing there is the following: The first five lines do not have anything to do with the following three, but the cursive part will fail. If I remove the first five lines or at least remove the bold part, the cursive part will work as expected. Therefore it seems that both problems are somewhat related. I tried this with the nightlies from 17.05.2011 and the current 01.06.2011. Regards, Dennis |
|
|
Hi Dennis, Are you able to resend the source for this please? The last attachment I can find has a model containing only TV/TPC/S/P (ComplexQuery).
Thanks! Jeremy |
|
|
Hi Jeremy, your right. I found the mail this morning in my outbox... It should be on its way now. Regards, Dennis |
|
|
Hi Dennis, Thanks - recieved the files and was able to reproduce the exception you mentioned. That is being caused by a bad assumption on our part, but ultimately this is not a supported scenario currently. I will add in some extra checks to avoid the exception you are seeing, but you will now see a NotSupportedException. Currently .Contains() is only supported with literal sequences e.g.
List<int> acceptableValues = …; var q = u.Ses.Where(se => acceptableValues.Contains(t.Id));
After removing that aspect of the query everything seemed to work correctly, was there another issue to do with the remove call that I am missing though?
Jeremy
|
|