Skip to content

Commit

Permalink
feat/MET-5620 update morphia record redirect (#635)
Browse files Browse the repository at this point in the history
MET-5620 update morphia record redirect
  • Loading branch information
jeortizquan authored Nov 13, 2023
1 parent ecc37a7 commit 2d01f57
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import dev.morphia.Datastore;
import dev.morphia.Morphia;
import dev.morphia.mapping.DiscriminatorFunction;
import dev.morphia.mapping.Mapper;
import dev.morphia.mapping.MapperOptions;
import dev.morphia.mapping.NamingStrategy;
import dev.morphia.query.filters.Filters;
Expand Down Expand Up @@ -60,7 +61,8 @@ private Datastore createDatastore(MongoClient mongoClient, String databaseName)
.collectionNaming(NamingStrategy.identity()).build();
final Datastore morphiaDatastore = Morphia
.createDatastore(mongoClient, databaseName, mapperOptions);
morphiaDatastore.getMapper().map(RecordRedirect.class);
final Mapper mapper = morphiaDatastore.getMapper();
mapper.getEntityModel(RecordRedirect.class);
LOGGER.info("Datastore initialized");
return morphiaDatastore;
}
Expand Down

0 comments on commit 2d01f57

Please sign in to comment.