Andrunevchyn

Andrunevchyn


January 2017
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories


Eclipse debug mode and MongoDB

Andriy AndrunevchynAndriy Andrunevchyn

I found out interesting thing –  when you debug your app with active connection to Mongo it could cause unexpected issue at least if use spring mongo data

What I noticed

  1. If you remove all data from collection you will not be able insert any new record to that collection
  2. Sometimes getAll method could return list of nulls instead list of your objects. I suspect I provoked  it by creating object manually with Change Value feature in Eclipse.  Seems issue appears here
    // Retrieve persistent entity info
    		MongoPersistentEntity<S> persistentEntity = (MongoPersistentEntity<S>) mappingContext
    				.getPersistentEntity(typeToUse);

    on org.springframework.data.mongodb.core.convert.MappingMongoConverter in method  private <S extends Object> S read(TypeInformation<S> type, DBObject dbo, ObjectPath path) 

    This line return a bit incorrect entity

  3. Perhaps I missed something more

andriy@andrunevchyn.com

Comments 0
There are currently no comments.