Closed greenlaw110 closed 7 years ago
When Dao is not initialized with EbeanServer directly and went into the second branch of the following code (i.e. EbeanServer loaded lazily):
Dao
EbeanServer
public EbeanServer ebean() { if (null != ebean) { return ebean; } synchronized (this) { if (null == ebean) { DB db = modelType().getAnnotation(DB.class); String dbId = null == db ? DbServiceManager.DEFAULT : db.value(); EbeanService dbService = getService(dbId, app().dbServiceManager()); E.NPE(dbService); ebean = dbService.ebean(); } } return ebean; }
The Dao is not going to load tableName field, which cause trouble when run Dao.drop() API
tableName
Dao.drop()
When
Dao
is not initialized withEbeanServer
directly and went into the second branch of the following code (i.e.EbeanServer
loaded lazily):The
Dao
is not going to loadtableName
field, which cause trouble when runDao.drop()
API