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