This commit is contained in:
@@ -157,7 +157,7 @@ public final class EntityInfo<T> {
|
||||
/**
|
||||
* 加载EntityInfo
|
||||
*
|
||||
* @param type Entity类
|
||||
* @param clazz Entity类
|
||||
* @param cacheForbidden 是否禁用EntityCache
|
||||
* @param conf 配置信息, persistence.xml中的property节点值
|
||||
* @param source DataSource,可为null
|
||||
@@ -341,7 +341,7 @@ public final class EntityInfo<T> {
|
||||
StringBuilder insertsbnames = new StringBuilder();
|
||||
int index = 0;
|
||||
for (String col : insertcols) {
|
||||
if (insertsb.length() > 0) insertsb.append(',');
|
||||
if (index > 0) insertsb.append(',');
|
||||
insertsb.append(col);
|
||||
if (index > 0) {
|
||||
insertsbjdbc.append(',');
|
||||
@@ -360,10 +360,10 @@ public final class EntityInfo<T> {
|
||||
StringBuilder updatesbnames = new StringBuilder();
|
||||
index = 0;
|
||||
for (String col : updatecols) {
|
||||
if (updatesb.length() > 0) {
|
||||
updatesb.append(',');
|
||||
updatesbdollar.append(',');
|
||||
updatesbnames.append(',');
|
||||
if (index > 0) {
|
||||
updatesb.append(", ");
|
||||
updatesbdollar.append(", ");
|
||||
updatesbnames.append(", ");
|
||||
}
|
||||
updatesb.append(col).append(" = ?");
|
||||
updatesbdollar.append(col).append(" = ").append("$").append(++index);
|
||||
|
||||
Reference in New Issue
Block a user