JPAstreamer is a lightweight toolkit for expressing JPA queries as Java Streams.
I don't think you understood my problem. I want to retrieve the larger entity efficiently.
public class HugeImage{
// some annotations like @Id
private long Id;
// some annotations like @Lob and Lazy_loading,
private byte[] content;
// getters, setters
}
How do I use streams to retrieve the content, without loading the complete content all at once?
On the contrary, we just made a release and are now working with new features. Stay tuned.
I don't see how filtering using the foreign key, in this case, would be any different from filtering on a regular column. Thus the following should work (names on actual columns and classes may differ):
jpaStreamer.stream(District.class).filter(District$.stateId.equal(1))
If you are only interested in the District data, you don't need to join in the State table.