Skip to content

Commit 75604ff

Browse files
author
Fab Castel
committed
workaround to add Entities to non-default DBs (ie. slave)
1 parent beb4529 commit 75604ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework/src/play/db/jpa/JPAPlugin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ public void onApplicationStart() {
134134
if (pu != null && pu.name().equals(dbName)) {
135135
cfg.addAnnotatedClass(clazz);
136136
Logger.debug("Add JPA Model : %s to db %s", clazz, dbName);
137-
} else if (pu == null && JPA.DEFAULT.equals(dbName)) {
137+
} else {//if (pu == null && JPA.DEFAULT.equals(dbName)) {
138138
cfg.addAnnotatedClass(clazz);
139139
Logger.debug("Add JPA Model : %s to db %s", clazz, dbName);
140-
}
140+
}
141141
}
142142
}
143143

0 commit comments

Comments
 (0)