Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#570 Using class instance breaks metadata lookup under a different cl…
…ass loader
- Loading branch information
Igor Polevoy
committed
Jan 11, 2017
1 parent
016035e
commit 4dd6ca0
Showing
2 changed files
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,12 @@ Class<? extends Model> getModelClass(String tableName) { | |
} | ||
|
||
String getTableName(Class<? extends Model> modelClass) { | ||
MetaModel mm = metaModelsByClass.get(modelClass); | ||
MetaModel mm = null; | ||
for (Class<? extends Model> clazz: metaModelsByClass.keySet()){ | ||
if(modelClass.getName().equals(clazz.getName())){ | ||
mm = metaModelsByClass.get(clazz); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
SergeyKhodussov
Contributor
|
||
} | ||
} | ||
return mm == null ? null : mm.getTableName(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think need a "break" success...
...
mm = metaModelsByClass.get(clazz);
break;
...