asolfre / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

cursor with sort fails SDK1.9.3/1.9.4 #200

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Execute query with a sort filter

Cursor cursor = null;

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

2.execute #1 with cursor result
Cursor cursor = results.getCursor();

3. Error is generated
 "IllegalArgumentException?: Cursor does not match query")

What is the expected output? 
cursor.toString()

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

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

What do you see instead?

the cursor is missing the sort field
cursor.toString()

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

What version of the product are you using? On what operating system?
4.0b3
5.02
c
Windows 7

Please provide any additional information below.

this exact code works on SDK 1.9.2.

but fails with GAE SDK 1.9.3, 1.9.4.

Original issue reported on code.google.com by lu...@asteriski.com on 12 May 2014 at 7:02

GoogleCodeExporter commented 9 years ago
This fails only in unit test and local devserver when running "mvn install app 
engine:devserver"
Ive tried this on a live server, and didn't happen. issue could be only on local

<plugin>
    <groupId>com.google.appengine</groupId>
                <artifactId>appengine-maven-plugin</artifactId>
                <version>${appengine.target.version}</version>
                <configuration>
                    <jvmFlags>
                        <jvmFlag>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</jvmFlag>
                    </jvmFlags>
                </configuration>
</plugin>

Original comment by secret.t...@gmail.com on 12 May 2014 at 7:49

GoogleCodeExporter commented 9 years ago
looks like this is an GAE issue.

https://code.google.com/p/googleappengine/issues/detail?id=10943

Original comment by lu...@asteriski.com on 19 May 2014 at 2:37

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by lhori...@gmail.com on 19 May 2014 at 2:40