Commit 81ee9a00 authored by Melledy's avatar Melledy Committed by GitHub
Browse files

Merge pull request #164 from miyucchi/development

Fix counter (Create a new account if exists issue)
parents 7a4de2f0 7792c5c7
......@@ -101,7 +101,7 @@ public final class DatabaseManager {
}
public static synchronized int getNextId(Class<?> c) {
DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getName())).first();
DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getSimpleName())).first();
if (counter == null) {
counter = new DatabaseCounter(c.getSimpleName());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment