title: Spring Data + MongoDB GridFS access via Repository possible?
body: <p>I recently discovered GridFS which I'd like to use for file storage with metadata. I just wondered if it's possible to use a <code>MongoRepository</code> to query GridFS? If yes, can someone give me an example?</p>
  
  <p>I'd also take a solution using Hibernate, if there is some.</p>
  
  <p>The reason is: My metadata contains a lot of different fields and it would be much easier to query a repository than to write some <code>new Query(Criteria.where(...))</code> for each scenario. And I hopefully could also simply take a Java object and provide it via REST API without the file itself.</p>
  
  <p>EDIT: I'm using</p>
  
  <ul>
  <li>Spring 4 Beta</li>
  <li>Spring Data Mongo 1.3.1</li>
  <li>Hibernate 4.3 Beta</li>
  </ul>