Open pilloPl opened 4 years ago
@Override public void save(Book book) { findBy(book.bookId()) .map(entity -> updateOptimistically(book)) .onEmpty(() -> insertNew(book)); }
this findBy is only there to have updateOrCreate behavior. But it makes optimistic locking doesn't work. in FindBy we fetch new Version
this findBy is only there to have updateOrCreate behavior. But it makes optimistic locking doesn't work. in FindBy we fetch new Version