Questions tagged [spring-data-document]
9 questions
                    
                    56
                    
            votes
                
                3 answers
            
        Mongo - Ignore property from being persisted
I have a standard POJO that has a set of properties in it. The POJO has been annotated as a @Document, so as to be persisted in MongoDB as a Document.
How (annotation??) can I ignore/avoid one of the properties in the POJO from being persisted?
         
    
    
        Saket
        
- 45,521
- 12
- 59
- 79
                    9
                    
            votes
                
                1 answer
            
        Spring Data MongoDB tries to generate queries for custom repository methods
Based on the Spring Data Document documentation, I have provided a custom implementation of a repository method. The custom method's name refers to a property which doesn't exist in the domain object: 
@Document
public class User {
    String…
         
    
    
        Ryan Tenney
        
- 1,812
- 3
- 16
- 29
                    8
                    
            votes
                
                3 answers
            
        Spring Data MongoDB: Accessing and updating sub documents
First experiments with Spring Data and MongoDB were great. Now I've got the following structure (simplified):
public class Letter {
  @Id
  private String id;
  private List sections;
}
public class Section {
  private String id;
  private… 
         
    
    
        Matthias Wuttke
        
- 1,982
- 2
- 21
- 38
                    6
                    
            votes
                
                2 answers
            
        Mongo repository for Spring Batch?
Is there a Mongo-based job repository for Spring Batch?  If not, would I need to implement JobInstanceDao and its siblings?  Are there any examples or existing works that would help in this endeavor?  
         
    
    
        RubyTuesdayDONO
        
- 2,350
- 2
- 25
- 37
                    5
                    
            votes
                
                2 answers
            
        DBRefs (Mongo Document references) not fetched eagerly
I am using Mongo in its simplest avatar possible (in conjunction with Spring Data).
I have two (first class) entities (@Documents) A and B, where A has a reference (@DBRef) of B within it. Everything works fine when creating A and B. However, when…
         
    
    
        Saket
        
- 45,521
- 12
- 59
- 79
                    5
                    
            votes
                
                1 answer
            
        resolving mongodb references in spring
Let's assume that I have the following documents in mongodb in the employees collection:
db.employees.insert({_id: ObjectId("4d85c7039ab0fd70a117d733"), name: 'Siona',
manager: [ObjectId("4d85c7039ab0fd70a117d730"),…
         
    
    
        Praveen R.
        
- 241
- 4
- 15
                    4
                    
            votes
                
                1 answer
            
        Does MongoDb XSD for Spring Data - Document define a db-factory element?
Spring Data - Document documentation gives and example of configuring a factory bean for creating MongoDB connections using mongo:db-factory element. 
        
            
            
                
                    
    
    
         
    
    
                
            
        
     
 
    
    
        Tahir Akhtar
        
- 11,385
- 7
- 42
- 69
                    2
                    
            votes
                
                1 answer
            
        Derived Queries not working with DBRef
I am using Mongo with Spring Data.
I have two (first class) entities (@Documents) Entity1 and Entity2, where Entity1 has a reference (@DBRef) of Entity2 within it. Everything works fine, but when executing derived queries such as :
public…
         
    
    
        Saket
        
- 45,521
- 12
- 59
- 79
                    2
                    
            votes
                
                1 answer
            
        Spring Data Mongodb Cross store:: With MySQL @RelatedDocument(s) not updating
I am using Spring Data Mongodb and Spring data JPA module for MySQL.
I have successfully configured as suggested in the reference document.
I am able to save but not able to update the mongodb "RelatedDocuments"
though I am successfully able to…
         
    
    
        Nishant
        
- 115
- 2
- 8