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
|
I'm running Lightspeed 3.11 against MSSQL. I noticed something new a few days ago, and I'm thinking it might be data dependent, but I can't find anything in the database that should be causing this. Here's a unit test showing some code that causes a NullReferenceException. The strange thing is that if I explicitly specify the join, it works fine. I've done nothing special to the Lightspeed model. Collection is a 1:M to CollectionDetails, which has a M:1 to MachineField. I'll do some more digging here, but I wanted to see if you have seen this type of thing before. Thanks much. public void NullReferenceExceptionOnInferredJoin() Call stack: System.NullReferenceException : Object reference not set to an instance of an object.
at ..(IdentifierExpression , FieldModel& , ToOneModel& , & , String& )
at ..(IdentifierExpression , FieldModel& , ToOneModel& , & , String& ) at ..(IdentifierExpression ) at Mindscape.LightSpeed.Querying.IdentifierExpression.[T]( ) at ..(PredicateExpression ) at Mindscape.LightSpeed.Querying.PredicateExpression.[T]( ) at ..(LiftedPathExpression ) at Mindscape.LightSpeed.Querying.LiftedPathExpression.[T]( ) at ..(AliasedTypeModel , QueryExpression , Order , Group , String , Boolean , Boolean ) at ..(AliasedTypeModel , QueryExpression , ProjectionCollection , Boolean , Boolean ) at ..(List`1 , Query , String , IdentifierExpression ) at ..(Query ) at Mindscape.LightSpeed.UnitOfWork.Project(Query query) at Mindscape.LightSpeed.Linq.Plan.SingleQueryPlan.ProjectManyNative(IUnitOfWork unitOfWork) at Mindscape.LightSpeed.Linq.Plan.SingleQueryPlan.ExecuteImmediate(IUnitOfWork unitOfWork, Type returnType) at Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression) at Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) at Mindscape.LightSpeed.Linq.LinqQuery`1.GetEnumerator() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList(IEnumerable`1 source) at LSTest.Class3.NullPointer() in Class3.cs: line 19 |
|
|
Hi Dan, No we havnt seen this behavior - any chance of sending through a small repro or even just your model? Should be enough for us to have a look furthor into this :)
Thanks! Jeremy |
|