Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f0443f

Browse files
committed
Merge pull request yangfuhai#46 from fantouch/fix_finalDb_oneToMany_not_work
修复FinalDb OneToMany无效的问题
2 parents e9534e6 + 003970b commit 0f0443f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/net/tsz/afinal/FinalDb.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ public <T> T loadOneToMany(T entity, Class<T> clazz, Class<?>... findClass) {
609609

610610
if (isFind) {
611611
List<?> list = findAllByWhere(one.getOneClass(),
612-
one.getColumn() + "='" + id + "'");
612+
one.getColumn() + "=" + id);
613613
if (list != null) {
614614
/* 如果是OneToManyLazyLoader泛型,则执行灌入懒加载数据 */
615615
if (one.getDataType() == OneToManyLazyLoader.class) {
@@ -888,10 +888,12 @@ public SqliteDbHelper(Context context, String name, int version,
888888
this.mDbUpdateListener = dbUpdateListener;
889889
}
890890

891-
public void onCreate(SQLiteDatabase db) {
891+
@Override
892+
public void onCreate(SQLiteDatabase db) {
892893
}
893894

894-
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
895+
@Override
896+
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
895897
if (mDbUpdateListener != null) {
896898
mDbUpdateListener.onUpgrade(db, oldVersion, newVersion);
897899
} else { // 清空所有的数据信息

0 commit comments

Comments
 (0)