"An error occurred while retrieving the data" for query entity on view

Hey everyone.

First, here is some background:

I'm trying to use the queryEntity() function on a CDT (called allTimesheetsView) but I get this error: "Expression evaluation error at function a!queryEntity: An error occurred while retrieving the data." allTimesheetsView (see below for XSD) was mapped to a database view of the same name.

My queryEntity() function looks like this: 

a!queryEntity(
  entity: cons!FLEXI_TIME_ALLTIMESHEETSVIEWENTITY,
  query: a!query(
    filter: a!queryFilter(
      field: "employeeId",
      operator: "=",
      value: ri!employeeId
    ),
    pagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: - 1
    )
  )
)

allTimesheetsView XSD looks like this: 

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:com:appian:types" targetNamespace="urn:com:appian:types">
  <xsd:complexType name="Flexi_Time_allTimesheetsView">
    <xsd:annotation>
      <xsd:appinfo source="appian.jpa">@Table(name="Flexi_Time_allTimesheetsView")</xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="timesheetId" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="timesheetId", nullable=false, columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="employeeId" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="employeeId", nullable=false, columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="startDate" nillable="true" type="xsd:date">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="startDate", nullable=false, columnDefinition="DATE")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="endDate" nillable="true" type="xsd:date">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="endDate", nullable=false, columnDefinition="DATE")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="workweekId" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="workweekId", nullable=false, columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="weekNumber" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="weekNumber", nullable=false, columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="workdayId" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Id @Column(name="workdayId", nullable=false, columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="date" nillable="true" type="xsd:date">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="date", nullable=false, columnDefinition="DATE")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="day" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="day", nullable=false, columnDefinition="VARCHAR(255)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="startTime" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="startTime", nullable=false, columnDefinition="VARCHAR(20)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="finishTime" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="finishTime", nullable=false, columnDefinition="VARCHAR(20)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="total" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="total", nullable=false, columnDefinition="VARCHAR(20)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="lunch" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="lunch", nullable=false, columnDefinition="VARCHAR(20)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="credits" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="credits", nullable=false, columnDefinition="VARCHAR(20)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="paidLeave" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="paidLeave", nullable=false, columnDefinition="VARCHAR(255)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="netHours" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="netHours", nullable=false, columnDefinition="VARCHAR(20)")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

Any ideas on what the problem could be? The data types for the cdt and database view match and I've tried recreating my cdt.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data