File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
activejdbc/src/main/java/org/javalite/activejdbc Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -2728,11 +2728,7 @@ public String toUpdate(){
2728
2728
}
2729
2729
}
2730
2730
}
2731
-
2732
- // join(query, attributeNames, " = ?, ");
2733
- // query.append(" = ?");
2734
-
2735
-
2731
+
2736
2732
2737
2733
if (manageTime && metaModel .hasAttribute ("updated_at" )) {
2738
2734
query .append (", updated_at = ?" );
@@ -2751,16 +2747,7 @@ public String toUpdate(){
2751
2747
query .append (" AND " ).append (getMetaModelLocal ().getVersionColumn ()).append (" = ?" );
2752
2748
values .add (get (getMetaModelLocal ().getVersionColumn ()));
2753
2749
}
2754
- // int updated = new DB(metaModel.getDbName()).exec(query.toString(), values.toArray());
2755
- // if(metaModel.isVersioned() && updated == 0){
2756
- // throw new StaleModelException("Failed to update record for model '" + getClass() +
2757
- // "', with " + getIdName() + " = " + getId() + " and " + getMetaModelLocal().getVersionColumn()
2758
- // + " = " + get(getMetaModelLocal().getVersionColumn()) +
2759
- // ". Either this record does not exist anymore, or has been updated to have another "
2760
- // + getMetaModelLocal().getVersionColumn() + '.');
2761
- // }else if(metaModel.isVersioned()){
2762
- // set(getMetaModelLocal().getVersionColumn(), getLong(getMetaModelLocal().getVersionColumn()) + 1);
2763
- // }
2750
+
2764
2751
if (metaModel .cached ()){
2765
2752
QueryCache .instance ().purgeTableCache (metaModel .getTableName ());
2766
2753
}
You can’t perform that action at this time.
0 commit comments