We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6352d46 commit 969bb0cCopy full SHA for 969bb0c
1 file changed
src/main/java/act/app/DbServiceManager.java
@@ -87,9 +87,11 @@ public Dao dao(Class<?> modelClass) {
87
Dao dao = modelDaoMap.get(modelClass);
88
if (null == dao) {
89
String svcId = DEFAULT;
90
- DB db = modelClass.getDeclaredAnnotation(DB.class);
91
- if (null != db) {
92
- svcId = db.value();
+ Annotation[] aa = modelClass.getDeclaredAnnotations();
+ for (Annotation a : aa) {
+ if (a instanceof DB) {
93
+ svcId = ((DB)a).value();
94
+ }
95
}
96
DbService dbService = dbService(svcId);
97
dao = dbService.defaultDao(modelClass);
0 commit comments