Commit 2dd96106 authored by Noel Alonso's avatar Noel Alonso
Browse files

Retorna el modelo completo al guardar

parent 1d20639d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,12 +88,12 @@ public abstract class ServiceRWImpl<TModel extends LongModel, TDTO extends DTO>
	public TModel persist(TModel model) {
		try {
			model = repository.saveAndFlush(model);
			return findById(model.getId());
		} catch (DataIntegrityViolationException e) {
			throw new DBConstraintViolationException(e);
		} catch (ConstraintViolationException e) {
			throw new DBPropertyValueException(e);
		}
		return model;
	}

	@Override