Friday, April 06, 2012 2:46 PM
Has anyone seen this before? I suddenly started receiving this after adding a Relationship via web services from a custom Entity on the "Files" navigation property. What is actually happening here and how can this be prevented? I have not touched the Zentity.Core.File definition in any way.
The exception takes place when I'm using the Zentity DataService to simply enumerate all Resources in a context :-/----------------------------------------
Title: Error :: HandleException - Navigation Properties are not supported on derived entity types. Entity Set 'Resources' has a instance of type 'Zentity.Core.File', which is an derived entity type and has navigation properties. Please remove all the navigation properties from type 'Zentity.Core.File'.
Message: Parameter Information
args : HandleExceptionArgs
System.InvalidOperationException: Navigation Properties are not supported on derived entity types. Entity Set 'Resources' has a instance of type 'Zentity.Core.File', which is an derived entity type and has navigation properties. Please remove all the navigation properties from type 'Zentity.Core.File'.
at System.Data.Services.Serializers.SyndicationSerializer.WriteObjectProperties(IExpandedResult expanded, Object customObject, ResourceType resourceType, Uri absoluteUri, String relativeUri, SyndicationItem item, DictionaryContent content, EpmSourcePathSegment currentSourceRoot)
at System.Data.Services.Serializers.SyndicationSerializer.WriteEntryElement(IExpandedResult expanded, Object element, ResourceType expectedType, Uri absoluteUri, String relativeUri, SyndicationItem target)
at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteItems(XmlWriter writer, IEnumerable`1 items, Uri feedBaseUri)
at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteFeedTo(XmlWriter writer, SyndicationFeed feed, Boolean isSourceFeed)
at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteFeed(XmlWriter writer)
at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteTo(XmlWriter writer)
at System.Data.Services.Serializers.SyndicationSerializer.WriteTopLevelElements(IExpandedResult expanded, IEnumerator elements, Boolean hasMoved)
at System.Data.Services.Serializers.Serializer.WriteRequest(IEnumerator queryResults, Boolean hasMoved)
at System.Data.Services.ResponseBodyWriter.Write(Stream stream)
Timestamp: 06.04.2012 16:25:35
App Domain: /LM/W3SVC/1635333731/ROOT/DataService-1-129781958977865253
- Changed Type WizMan Sunday, April 08, 2012 11:25 AM Solved issue myself
Sunday, April 08, 2012 11:25 AMI have resolved this myself through a clean reinstall of Zentity. I still don't know what had gone wrong, but it seems reinstalling did the trick. It may have had something to do with adding a Relationship as stated above. I believe I shall go around this issue by simply defining my own File entity in my model, as Kalnemi said in an older post that Relationships between entities in different models may cause issues.