I have made an experiment… one common entity for two Spring data’s repositories: – JPA – MongoDB first of all I’ using following libraries versions: spring-data-jpa : 1.7.0.RELEASE spring-data-mongodb : 1.6.0.RELEASE I have an Entity: JPA Repository has following look: MongoDB repository has following look: package ua.home.springdata.investigation.repository.mongo; So… JPA works 🙂 Nothing special 🙂 But MongoDB test is not passed
Tag: spring-data-mongodb
What’s the difference between Spring Data’s MongoTemplate and MongoRepository?
I need to write an application with which I can do complex queries using spring-data and mongodb. I have been starting by using the MongoRepository but struggled with complex queries to find examples or to actually understand the Syntax. I’m talking about queries like this: or the use of JSON based queries which I tried by trial and error because
Spring-data-mongodb connect to multiple databases in one Mongo instance
I am using the latest spring-data-mongodb (1.1.0.M2) and the latest Mongo Driver (2.9.0-RC1). I have a situation where I have multiple clients connecting to my application and I want to give each one their own “schema/database” in the same Mongo server. This is not a very difficult task to achieve if I was using the driver directly: See, easy. But
spring-data-mongo – optional query parameters?
I am using spring-data mongo with the JSON based query methods, and am unsure how to allow optional parameters in a search query. For instance – say I had the following function -but I didnt want to apply the name regex match, or not apply a date range restriction if NULL values were passed to the method. At the moment