Question

I am getting issues when upgrading to GAE SDK 1.9.3/4 using Objectify 4.0b3/5.02

When i Execute query with a sort filter and reuse the cursor it is throwing

"IllegalArgumentException?: Cursor does not match query"

the code is below

QueryResultIterator<FollowJoin> results = ofy().load().type(FollowJoin.class).
filter("followerKey", PositionUser.key(1)).
    order("sortIndexFollowing").
    limit(1).
    startAt(cursor).
    iterator();
    cursor = results.getCursor();

the cursor returned is strangely different to the cursor returned from a native DS query.

>>>Position {
  IndexValue {
    property: "sortIndexFollowing"
    value <

    >
  }
  key <
    app: "test"
    path <
      Element {
        type: "FollowJoin"
        name: "USER_10-USER_1"
      }
    >
  >
  start_inclusive: false
}

the Objectify cursor is missing the sort field

>>>Position {
  key <
    app: "test"
    path <
      Element {
        type: "FollowJoin"
        name: "USER_10-USER_1"
      }
    >
  >
  start_inclusive: false
}

this exact code works on SDK 1.9.2.

but fails with GAE SDK 1.9.3, 1.9.4.

clearly my query is using the order param but the cursor does not contain the order field.

It seems to be limited to the development environment and does not show up in the production environment. This is causing issues with testing on dev.

what is causing the change of behavior?

thanks

-lp

Was it helpful?

Solution

This issue is not caused by Objectify. I am experiencing the exact same issue in projects that do not use Objectify.

The error is caused by a change in the App Engine SDK.

I suggest rolling back to 1.9.2. until an update is available.

EDIT: posted bug report (https://code.google.com/p/googleappengine/issues/detail?id=10943)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top