Fix counter

This commit is contained in:
Miyucchi 2022-04-24 00:10:26 +02:00
parent fb2b98a6cf
commit c4cdc97d7b

View File

@ -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());
}