Skip to content

orderBy generates too many spaces in the newQuery method #57

Description

@yochannah

This R code

# Create a new query
Pax6List = newQuery(
  #here we're choosing which columns of data we'd like to see
  view = c("Gene.primaryIdentifier",
           "Gene.symbol"),
  sortOrder = list("Gene.primaryIdentifier", "ASC"))

# Make a constraint: 
listConstraint = setConstraints(
  paths = c("Gene"),
  operators = c("IN"),
  values = list("PL_Pax6_Targets")
)

# Add the constraint to the query
Pax6List$where <- listConstraint

generates this XML:

<query name="" model="genomic" view="Gene.primaryIdentifier Gene.symbol" longDescription="" sortOrder=" Gene.primaryIdentifier  ASC">
  <constraint path="Gene" value="PL_Pax6_Targets" code="A" op="IN" extraValue=""/>
</query>

Note that there are too many spaces in sortOrder. The space space BEFORE Gene.primaryIdentifier is ignored, but there is also a double space between Gene.primaryIdentifier and ASC. This causes the InterMine server to throw a 400 error when it is run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions