speedment / jpa-streamer

JPAstreamer is a lightweight library for expressing JPA queries as Java Streams
GNU Lesser General Public License v2.1
345 stars 35 forks source link

Count doesn't returning the good value #206

Closed tokazio closed 2 years ago

tokazio commented 2 years ago

Using hibernate and JPAStreamer When i do Streamer.stream(Ett class).count() It's returning 1 while Select count(*) from t_ett Is returning the good number of line in the table.

JPAStreamer use a count(field) instead of count(*) when quering, that's the only difference i've seen.

Is there a cache somewhere ? Why JPAStreamer isn't returning the good value ?

minborg commented 2 years ago

JPAStreamer never caches values internally. If you run the https://github.com/speedment/jpa-streamer-demo/tree/master/hibernate demo on your settings, do you get the same problem?