asolfre / objectify-appengine

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

limit on Query not working #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Loader loader = ofy().load();
2.Query<MyEntity> query = loader.type(MyEntity.class);
3.query.limit(5);

What is the expected output? What do you see instead?
query.list().size() should be be limited to 5. 
I get back more. The limit is not applied...

What version of the product are you using? On what operating system?
Objectify-4.0b2

Please provide any additional information below.
query.filter(), .order() do work, only the limit() is not working.

Original issue reported on code.google.com by luc.de.c...@gmail.com on 2 May 2013 at 10:09

GoogleCodeExporter commented 9 years ago
Are you assigning the query object properly?

query = query.limit(5);

Query objects are immutable; without the assignment (or method chaining) the 
limit() call does nothing.

The limit() method is tested; if you think there's something wrong with it 
please post a full test case.

Original comment by lhori...@gmail.com on 3 May 2013 at 7:29

GoogleCodeExporter commented 9 years ago
woa that is really stupid of me to miss that.

My apologies to waste your time. ;)

Thanks

Original comment by luc.de.c...@gmail.com on 3 May 2013 at 9:10