| @OrderColumn applies as expected on the database layer but not on the managed entity upon save. If a POST/PUT request needs to return the saved entity, then it's needed to clear the entity manager, and request the object from the database again. e.g.
repository.save(theEntity);
entityManager.clear();
return repository.findById(theEntity.getId());
It should be sufficient to do just:
return repository.save(theEntity);
For example the @Version annotation works as expected. |