mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-03 05:20:50 +00:00
增加类型判断
This commit is contained in:
1 parent
bb062248d6
commit
cd26fca3c3
1 file changed
+8
-1
@@ -338,7 +338,14 @@ public class OrmManager implements IOrmManager {
|
||||
"class java.util.Date")){
|
||||
throw new IllegalArgumentException(StringUtils.format("[{}]不是Date类型", field.getName()));
|
||||
}
|
||||
|
||||
if (!field.getGenericType().toString().equals(
|
||||
"java.util.List<java.util.Date>")){
|
||||
throw new IllegalArgumentException(StringUtils.format("[{}]不是List<Date>类型", field.getName()));
|
||||
}
|
||||
if (!field.getGenericType().toString().equals(
|
||||
"class [Ljava.util.Date;")){
|
||||
throw new IllegalArgumentException(StringUtils.format("[{}]不是Date[]类型", field.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
IndexDef indexDef = new IndexDef(field, indexAnnotation.ascending(), indexAnnotation.unique(),indexAnnotation.ttl(),indexAnnotation.expireAfterSeconds());
|
||||
|
||||
Reference in new issue
Block a user