@@ -183,7 +183,7 @@ public void enableCaching(CacheManager cacheManager) {
183183 * <i>Warning:</i> This tries to update all tables that are part of mapping
184184 * proxies. Should be used carefully.
185185 *
186- * @return True if synchronization was successful
186+ * @return True if there were any changes
187187 */
188188 @ ApiStatus .Experimental
189189 @ Override
@@ -192,7 +192,7 @@ public boolean synchronizeModel() {
192192 .stream ().flatMap (i -> i .getTableSchemas (
193193 getOptions ().getNamingStrategy (),
194194 this instanceof SQLiteDatabaseConnectionImpl ).stream ())
195- .allMatch (schema -> synchronizeModel (schema , schema .getTable ()));
195+ .anyMatch (schema -> synchronizeModel (schema , schema .getTable ()));
196196 }
197197
198198 /**
@@ -202,13 +202,14 @@ public boolean synchronizeModel() {
202202 *
203203 * @param entitySchema Entity schema
204204 * @param table Table name
205- * @return True if synchronization was successful
205+ * @return True if there were any changes
206206 */
207207 @ ApiStatus .Experimental
208208 @ Override
209209 public boolean synchronizeModel (TableSchema entitySchema , String table ) {
210- return getSchemaSynchronizer ().synchronize (this , entitySchema ,
211- getSchemaBuilder (table ).buildTableSchema ()).isSuccessful ();
210+ QueryResult result = getSchemaSynchronizer ().synchronize (this , entitySchema ,
211+ getSchemaBuilder (table ).buildTableSchema ());
212+ return result != QueryResult .noChangesResult && result .isSuccessful ();
212213 }
213214
214215 /**
@@ -219,7 +220,7 @@ public boolean synchronizeModel(TableSchema entitySchema, String table) {
219220 *
220221 * @param entity The entity (model) class
221222 * @param table Table name
222- * @return True if synchronization was successful
223+ * @return True if there were any changes
223224 */
224225 @ ApiStatus .Experimental
225226 @ Override
0 commit comments