У меня следующий код:JPA не промывка удалить
@Transactional
public class DbCrudServiceImpl implements DbCrudService {
@Override
public void cleanupDb() {
...
serviceUserRepository.deleteAll(); //Spring data JPA repository for entity ServiceUser
serviceUserRepository.flush();
...
}
...
}
который Весенний боб.
Я установил hibernate.show_sql
к true
в свойствах JPA и лесопогрузчика org.hibernate.event.internal.AbstractFlushingEventListener
к DEBUG
для того, чтобы осмотреть то, что происходит в cleanupDb.
Показанные линии cleanupDb произвели журнал:
23:18:53.398 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:149 - ## Processing flush-time cascades
23:18:53.401 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:189 - ## Dirty checking collections
23:18:53.406 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:123 - ## Flushed: 0 insertions, 0 updates, 0 deletions to 8 objects
23:18:53.407 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:130 - ## Flushed: 0 (re)creations, 0 updates, 0 removals to 24 collections
Hibernate: select ... from SERVICE_USER ...
23:19:01.753 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:149 - ## Processing flush-time cascades
23:19:01.757 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:189 - ## Dirty checking collections
23:19:01.761 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:123 - ## Flushed: 0 insertions, 0 updates, 0 deletions to 8 objects
23:19:01.763 [main] DEBUG o.h.e.i.AbstractFlushingEventListener:130 - ## Flushed: 0 (re)creations, 0 updates, 0 removals to 24 collections
Почему нет ВЕЬЕТЕ? Почему он не покраснел?