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, we are observing a very strange error when we call DistributedUnitOfWork.Remove(Entity) over one of our entities. This entity is called Path, and it´s related to another entity called MaterialData. A Path has a collection of MaterialData objects and for our WCF scenario we have the following properties:
When we Remove our path entity serveral things happen (not 100% is this exact order as everything happens nearly at the same time in different windows):
SELECT MaterialsData.Id AS "MaterialsData.Id" FROM MaterialsData WHERE MaterialsData.PathId = 1 --> Time: 0 ms
The value "1" is not of type "Mindscape.LightSpeed.Entity" and cannot be used in this generic collection. Parameter name: value at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType) at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item) at ☼.♫.?(AliasedTypeModel , QueryExpression , Order , Group , String , Boolean , Boolean ) at ♣.►.?(LightSpeedContext , List`1 , QueryExpression , Order , Group , String , Boolean , Boolean ) at ☼.♫.?(AliasedTypeModel , IList , String , Boolean ) at ☼.♫.?(TypeModel , Query , IList ) at ♣..?(Query , TypeModel , IList ) at ♣..?(Query , IList ) at Mindscape.LightSpeed.UnitOfWork.Find(Query query, IList results) at Mindscape.LightSpeed.UnitOfWorkBase.Find(Query query) at Mindscape.LightSpeed.ServiceModel.DistributedUnitOfWorkService.Find(String typename, Query query)
Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Mindscape.LightSpeed.ServiceModel.IDistributedUnitOfWorkContract.Find(String typename, Query query) at Mindscape.LightSpeed.ServiceModel.DistributedUnitOfWork.Find(Query query, IList results) at Mindscape.LightSpeed.Mapping.InMemoryDeleteCascader.UpdateModel(UnitOfWorkBase , AssociationModel , QueryExpression ) at Mindscape.LightSpeed.Mapping.InMemoryDeleteCascader.BuildCascadingDeletes(Entity , UnitOfWorkBase , TypeModel , QueryExpression ) at Mindscape.LightSpeed.Mapping.InMemoryDeleteCascader.Cascade(Entity , UnitOfWorkBase ) at Mindscape.LightSpeed.ServiceModel.DistributedUnitOfWork.Remove(Entity entity) at CTech.Visualization.Model.Repository`1.Delete(Entity entity) at EnterVolArcGis.Modeling.Data.ViewModels.PathsViewModel.RemovePath() in C:\Development\C Tech\Dev-EnterVol for ArcGIS\EnterVolArcGis\Modeling\Data\ViewModels\PathsViewModel.cs:line 293 I am pretty lost on why this is happening (other entities delete perfectly, not sure what is happening with this one). Any ideas or any other info that could be useful? (I'm trying to build a repo, no luck so far in my test case with your stories/comment example). Regards, Vicente |
|
|
Thanks - I am pretty sure I can see how this might happen so I should be able to set up a repro case here to validate that - will advice is that proves to turn out to be a dead end but Im fairly confident I know whats going on here :)
Jeremy |
|
|
Hi Vicente, I believe I have managed to repro this (certainly the same class of issue) so Ive added some additional functionality into the DistributedUnitOfWork to cater for this. The problem stems from a Find with IdentifiersOnly query being issued which is not something that was previously handled by the DistributedUnitOfWork. Ive added in support for this and I believe Ive patched the paths where this will be used either automatically or via a manual call and these changes will be in the next nightly build. Let me know if there are any lingering issues around this that you are seeing.
Thanks! Jeremy |
|
|
Hi Jeremy! it seems our issue has been fixed, thanks a lot as usual! Regards, Vicente |
|