Skip to content

Commit

Permalink
Merge pull request #68 from kaiso/B#67
Browse files Browse the repository at this point in the history
[B#67] remove postloading cache
  • Loading branch information
kaiso committed Jan 24, 2021
2 parents f62d7d1 + 41ab90b commit 42d028c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The RelMongo Java framework provides relationships mapping of MongoDB domain mod
For documentation, wiki and examples please visit the project [home page](https://kaiso.github.io/relmongo/).
# LICENSE

© Copyright 2020 Kais OMRI.
© Copyright 2021 Kais OMRI.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.kaiso.relmongo</groupId>
<artifactId>relmongo</artifactId>
<version>3.4.1</version>
<version>3.4.2</version>
<packaging>jar</packaging>

<name>relmongo</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

/**
Expand All @@ -54,20 +50,12 @@ public class PersistentPropertyPostLoadingCallback implements FieldCallback {
private Object source;
private MongoOperations mongoOperations;
private Document document;
private static ConcurrentHashMap<UUID, Map<Object, Object>> cache = new ConcurrentHashMap<>();
private UUID executionId;

public PersistentPropertyPostLoadingCallback(Object source, Document document, MongoOperations mongoOperations) {
super();
this.source = source;
this.mongoOperations = mongoOperations;
this.document = document;
this.executionId = UUID.randomUUID();
cache.put(executionId, new HashMap<>());
}

public void close() {
cache.remove(executionId);
}

public void doWith(Field field) throws IllegalAccessException {
Expand Down

0 comments on commit 42d028c

Please sign in to comment.