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
|
We have just upgraded to Lightspeed 3.1 from Lightspeed 3.0 and the following code which worked fine with 3.0 is not working with 3.1 Scenario Database tables ControlValues(Id, ControlTypeId, ControlEntityId, Value) ControlEntityType(Id, EntityType) There is a 1 to many relationship between ControlEntityType and ControlValues Code from ct in uow.ControlEntityTypes sEntry is an string parameter. In Lightspeed 3.0 this query returned a list of strings. With Lightspeed 3.1, we get the following error message Specified argument was out of the range of valid values. Stack Trace (part) Mindscape.LightSpeed.Utils.Invariant.ArgumentNotEmpty(String , String ) +176 Mindscape.LightSpeed.Querying.PathExpression..ctor(Type entityType, String path) +82 Mindscape.LightSpeed.Entity.Attribute(Type entityType, String attributePath) +52
|
|
|
I'm not sure what I'm missing, but I've run this in our test environment and I'm not able to reproduce the error -- the query works for me and returns a list of strings as expected. Could you post a bit more of the stack trace and, ideally, a small but complete console project that reproduces the error? Thanks! |
|
|
We also found that the following two queries do work (without a where clause and not selecting a single column)
from ct in uow.ControlEntityTypes
from ct in uow.ControlEntityTypes Entire (lightspeed & .net) stack trace [ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: The provided string argument [path] cannot be empty] Mindscape.LightSpeed.Utils.Invariant.ArgumentNotEmpty(String , String ) +176 Mindscape.LightSpeed.Querying.PathExpression..ctor(Type entityType, String path) +82 Mindscape.LightSpeed.Entity.Attribute(Type entityType, String attributePath) +52 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateQueryExpression(MemberExpression member) +174 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateProjectionQueryExpressionImpl(Expression expression) +252 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateProjectionQueryExpression(Expression expression, Boolean autoConvertPredicates) +42 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateProjectionQueryExpression(Expression expression) +39 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateQueryExpression(MemberExpression member) +214 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateProjectionQueryExpressionImpl(Expression expression) +252 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateProjectionQueryExpression(Expression expression, Boolean autoConvertPredicates) +42 Mindscape.LightSpeed.Linq.ProjectionQueryExpressionBuilder.CreateProjectionQueryExpression(Expression expression) +39 Mindscape.LightSpeed.Linq.ProjectionQueryBuilder.CreateProjectionQueryExpression(Expression expression) +127 Mindscape.LightSpeed.Linq.ProjectionQueryBuilder.VisitMemberAccess(MemberExpression member) +65 Mindscape.LightSpeed.Linq.Plan.ExpressionVisitor.Visit(Expression exp) +500 Mindscape.LightSpeed.Linq.Plan.SingleQueryPlan.CreateProjectionOnQuery(IUnitOfWork unitOfWork, Expression projector) +85 Mindscape.LightSpeed.Linq.Plan.SingleQueryPlan.ProjectManyNative(IUnitOfWork unitOfWork) +153 Mindscape.LightSpeed.Linq.Plan.SingleQueryPlan.ExecuteImmediate(IUnitOfWork unitOfWork, Type returnType) +996 Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression) +237 Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +36 Mindscape.LightSpeed.Linq.LinqQuery`1.GetEnumerator() +40 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +7667878 System.Linq.Enumerable.ToList(IEnumerable`1 source) +61 |
|
|
It looks like we have a bug handling certain property names in scenarios that involve joins with filtering and projection. In your case, we are incorrectly treating Value as a property that needs to be translated to SQL. As a temporary workaround, if you change rename Value to, say, TextValue (while keeping the column mapping to Value of course), this gets around the bug. I'll try to get the underlying issue fixed for you and will let you know hopefully later today. |
|
|
We have now implemented a fix for this and it will be included in the next nightly build (28 May), which will be available from about 1500 GMT. |
|