Hiro Protagonist
Hiro Protagonist

Reputation: 483

StreamResult parameter type in RavenDB query

I took an example from the RavenDB documentation, and adapted it to fit the types I am working with in my code. The type I am using is known (it can be resolved), and the query targets a predefined index. The query uses the spatial option, if that has any part to play in this.

In Eclipse, no matter what type I use for T in this: CloseableIterator<StreamResult<T>> - the error message is always "The type StreamResult is not generic; it cannot be parameterised with arguments <whatever>". As I'm still quite new to RavenDB, this may well be something obvious that I'm missing. The type I am working with is a POJO, and consists exclusively of Strings, int and floats. If you require more info on the index or the type, please let me know.

Thanks !

Upvotes: 1

Views: 59

Answers (1)

Hiro Protagonist
Hiro Protagonist

Reputation: 483

Pay close attention to your imports ! In my case, it was a simple case of adding the wrong import - because I clicked too fast without verifying that it was the correct library (Eclipse suggested something and I just accepted). It should have been the second option:

net.ravendb.abstractions.data.StreamResult

and NOT

javax.xml.transform.stream.StreamResult

which was first in the list of suggested fixes.

Upvotes: 2

Related Questions