static void setDeliveryAdvice(Delivery delivery, String advice) throws Exception { if (delivery.getClass().isAnnotationPresent(Entity.class)) { // In the JPA entity we use a @Transient and @Required for advice property // we need to put value to advice in order to pass // Hiberntate Validator constraint PropertiesManager pm = new PropertiesManager(delivery); pm.executeSet("advice", advice); } // In OX2, advice is a view property then it does not exist in delivery }