locked
$expand limitation RRS feed

Answers

  • Ok, I could fix the error. The problem was that my Genotype table had a column called Uid of the type Guid while my other Tables had this column called UId with a uppercase "i". I guess Astoria or the underlaying EDM doesn't like columns with this name "Uid".

     

    I don't know whether this is a bug or a "by design thing".

     

    Cheers Jan

     

    Monday, July 28, 2008 10:23 PM

All replies

  •  

    Hi Jan,

     If you are using the EF as your Data Provider to astoria , the limit for expand depth is 8.

     Its interesting to see you are getting errors at only 3 levels deep.
     Can you please try a fiddler trace on the failing case and copy the output as a reply ?

     

    Monday, July 28, 2008 9:21 PM
    Moderator
  • Here is the exception:

    Code Snippet
    An error occurred while executing the command definition. See the inner exception for details.   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)   at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.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()The column 'Uid' was specified multiple times for 'Project1'.A column has been specified more than once in the order by list. Columns in the order by list must be unique.   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()   at System.Data.SqlClient.SqlDataReader.get_MetaData()   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

     

     

    Is Uid also used by Astoria? I have oneach table a primary Key called UId.
     
     
    Monday, July 28, 2008 9:33 PM
  • Hi Jan,

    Thanks for the error message.
    I'll look at it in detail,

    in the meantime , can you try this query and see if it succceeds or fails ?

     

    http://localhost:7777/CandyService.svc/Gene?$expand=Pathway,Genotype

     

     

    Monday, July 28, 2008 9:45 PM
    Moderator
  • This http://localhost:7777/CandyService.svc/Gene?$expand=Pathway,Genotype query throws the same error as with three parameter.

    Monday, July 28, 2008 9:50 PM
  • Ok, I could fix the error. The problem was that my Genotype table had a column called Uid of the type Guid while my other Tables had this column called UId with a uppercase "i". I guess Astoria or the underlaying EDM doesn't like columns with this name "Uid".

     

    I don't know whether this is a bug or a "by design thing".

     

    Cheers Jan

     

    Monday, July 28, 2008 10:23 PM
  • Hi Jan,

     Thanks for verifying , can you send us your schema ?

     I want to take a closer look at this to see if this is could be a problem.

     Send me an email at : PHANIRAJ AT MICOROSFT DOT COM

     

     

    Monday, July 28, 2008 11:40 PM
    Moderator
  •  

    Ok, email is on the way.
    Monday, July 28, 2008 11:53 PM
  • Hi jan,

     Thanks for sending your db schema to see if the problem still exists.

      I changed the Column Name UID of the table GenoType to be : UiD and I dont see a problem with the expand query /Gene?$expand=GenoType,Pathway.

     I wasnt able to reproduce the problem on the RTM bits .

     So, I think this is resolved in the latest bits.

     Thanks for taking the time for providing the repro.

     

     

    Tuesday, August 5, 2008 5:11 PM
    Moderator
  • Do you renamed it to UiD? Try Uid, that was where I had the problem. Is a case sensitive problem.

     

     

     

     

    Tuesday, August 5, 2008 5:29 PM
  • "I changed the Column Name UID of the table GenoType to be : UiD "

    Yes , I did rename the column to UiD and wasnt able to repro the error.

     

     

    Tuesday, August 5, 2008 7:30 PM
    Moderator
  • No not UiD. You should rename it to Uid with a upper D, and a lower i and a lower d.

     

    Tuesday, August 5, 2008 7:33 PM