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! I am not expecting this to ever work because I know I am really expecting magic to happen from Lightspeed (which often does happen so my expectations are lifted to unrealistic levels ;-)) However not sure if the exception I get is o.k. To get this working I can setup a join. Query:
The partial class:
Exception: at ..(IdentifierExpression , FieldModel& , ToOneModel& , & , String& )
at ..(IdentifierExpression , FieldModel& , ToOneModel& , & , String& )
at ..(IdentifierExpression )
at Mindscape.LightSpeed.Querying.IdentifierExpression.T
at ..(PredicateExpression )
at ..(PredicateExpression )
at Mindscape.LightSpeed.Querying.PredicateExpression.T
at ..(AliasedTypeModel , QueryExpression , Order , Group , String , Boolean , Boolean )
at ..(LightSpeedContext , List |
|
|
I see that most of the stacktrace is destroyed due to the obfuscation characters. Here a screenshot: |
|
|
This happens because CurrentQuantity is a property calculated in .NET, not a column in the database. We can't decompile the CurrentQuantity getter and translate it to SQL. You need to spell it out in the query, or use a ninja domain property to express CurrentQuantity as an expression (because we can translate expressions into SQL). Note however that not all expressions are translatable into SQL -- I'm not sure whether we would handle the CurrentQuantity expression. |
|
|
Hey Ivan, I've been looking into it, I think it is hard to translate it to SQL (as I said, I don't expect this to work), I was mostly wondering about if the exception wasn't happening 'too high up', since it was very uninformative. Thanks nonetheless! |
|
|
Good point -- we should indeed do better to identify this and provide a meaningful explanation. Thanks for the feedback! |
|