New Posts New Posts RSS Feed: Query Includes Trigger Relation Link Exception
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Query Includes Trigger Relation Link Exception

 Post Reply Post Reply Page  <12
Author
ksmith View Drop Down
Newbie
Newbie
Avatar

Joined: 26-May-2010
Posts: 7
Post Options Post Options   Quote ksmith Quote  Post ReplyReply Direct Link To This Post Topic: Query Includes Trigger Relation Link Exception
    Posted: 26-May-2010 at 2:42pm
The following exception happens on Windows Server 2008 with IIS 7, Enterprise SQL Server 2008. However, using an exact copy of the database on Windows 7 using Visual Studio 2010 built in web server, this exception does not get thrown. The exception is triggered by an .Include() on a query. Queries without includes run perfectly. And again, I copied the database to SQL Express 2008 on my local machine and the error does not happen. I thought maybe the foreign key names in the database did not match the EDM schema. However, the .Include() work just fine locally and do not trigger this exception. The .NET Framework is 4 in both environments. Any ideas on what could cause this or on how to get more details of the error?
 
Caught exception: System.Data.EntityException: Unable to set field/property .... See InnerException for details. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.
   at IdeaBlade.EntityModel.NavigationEntityProperty.get_RelationLink()
   at IdeaBlade.EntityModel.NavigationListEntityProperty`2.GetEntityReference(EntityWrapper wrapper)
   at IdeaBlade.EntityModel.NavigationListEntityProperty`2.GetValueForSerialization(EntityWrapper ew)
   at IdeaBlade.EntityModel.NavigationListEntityProperty`2.GetValue(TInstance instance)
   at lambda_method(Closure , Object )
   at System.Data.Objects.Internal.EntityProxyFactory.&lt;&gt;c__DisplayClass5.&lt;CreateBaseGetter&gt;b__4(Object entity)
   at System.Data.Objects.Internal.PocoPropertyAccessorStrategy.GetNavigationPropertyValue(RelatedEnd relatedEnd)
   --- End of inner exception stack trace ---
   at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType)
   at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery()
   at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, EntityServer entityServer)
   at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate)
   at SyncInvokeFetch(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</entry>
 
Thanks
Keith
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down