}\r
// remove this model class from the table definition cache\r
classMap.remove(modelClass);\r
+ // remove this model class from the upgrade checked cache\r
+ upgradeChecked.remove(modelClass);\r
return rc;\r
}\r
\r
}\r
return def;\r
}\r
+ \r
+ <T> boolean hasCreated(Class<T> clazz) {\r
+ return upgradeChecked.contains(clazz);\r
+ }\r
\r
public synchronized void setDbUpgrader(DbUpgrader upgrader) {\r
if (!upgrader.getClass().isAnnotationPresent(IQVersion.class)) {\r
db.upgradeTable(this);\r
return this;\r
}\r
+ if (db.hasCreated(clazz)) {\r
+ return this;\r
+ }\r
SQLStatement stat = new SQLStatement(db);\r
db.getDialect().prepareCreateTable(stat, this);\r
IciqlLogger.create(stat.getSQL());\r