The 'HasStream' attribute is not allowed?

The 'HasStream' attribute is not allowed?

Postby dm3sol » Mon 07 Nov 2011 02:16

I am trying to implement a photo service thought OData with a Streaming Provider for uploading pictures. I added an attribute:

Code: Select all

         
           
         

         
         
         


But when I run the service I get this error:

Code: Select all
Schema specified is not valid. Errors: Model.AquiisModel.ssdl(1504,32) : error 0005: The 'HasStream' attribute is not allowed.
  System.Data.MetadataException
  at System.Data.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors() at System.Data.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths) at System.Data.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerManifestToken, Memoizer`2& cachedCTypeFunction) at System.Data.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths) at System.Data.Metadata.Edm.MetadataCache.StoreMetadataEntry.LoadStoreCollection(EdmItemCollection edmItemCollection, MetadataArtifactLoader loader) at System.Data.Metadata.Edm.MetadataCache.StoreItemCollectionLoader.LoadItemCollection(StoreMetadataEntry entry) at System.Data.Metadata.Edm.MetadataCache.LoadItemCollection[T](IItemCollectionLoader`1 itemCollectionLoader, T entry) at System.Data.Metadata.Edm.MetadataCache.GetOrCreateStoreAndMappingItemCollections(String cacheKey, MetadataArtifactLoader loader, EdmItemCollection edmItemCollection, Object& entryToken) at System.Data.EntityClient.EntityConnection.LoadStoreItemCollections(MetadataWorkspace workspace, DbConnection storeConnection, DbProviderFactory factory, DbConnectionOptions connectionOptions, EdmItemCollection edmItemCollection, MetadataArtifactLoader artifactLoader) at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections) at System.Data.EntityClient.EntityConnection.InitializeMetadata(DbConnection newConnection, DbConnection originalConnection, Boolean closeOriginalConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() at System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal() at System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator() at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService) at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) at System.Data.Services.DataService`1.HandleRequest()


It seems to me that Entity Developer does not support this arribute too. I did not find a way to add this attribute.

Even though it looks like an issue of DataService, would you have any ideas what I am missing?
dm3sol
 
Posts: 6
Joined: Tue 11 May 2010 08:46

Postby StanislavK » Mon 07 Nov 2011 16:48

The reason for the problem is that the HasStream parameter is not available in the standard EDMX schema. To use it in the model, it is necessary to attach the Data Services schema and use its prefix before HasStream. For an example of this, please refer, e.g., to
http://msdn.microsoft.com/en-us/library/ee473426.aspx

Entity Developer does not support such extensions of the standard schema, thus it is necessary to add them manually. We will analyze the possibility of supporting them and inform you about the results.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby dm3sol » Mon 07 Nov 2011 17:15

Yes that was it. Thanks for a prompt reply and help!
dm3sol
 
Posts: 6
Joined: Tue 11 May 2010 08:46

Postby StanislavK » Fri 09 Dec 2011 17:05

We've added the possibility of specifying the HasStream entity property in Entity Developer. This feature is available in the new 4.2.85 version of Entity Developer, which can can be downloaded from
http://www.devart.com/entitydeveloper/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only).

For the detailed information about the fixes and improvements available in Entity Developer 4.2.85, please refer to
http://www.devart.com/forums/viewtopic.php?t=22845
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle