hibernate

Updating Entities with Update Query in Spring Data JPA

March 25, 2015 by

With object-relational mapping (ORM) tools such as Hibernate, one usually modifies entities by first fetching them from the database, modifying some fields, and then persisting the entities again. This is a good approach in many cases, but in some scenarios this may not be desirable. For instance, if you want to update a collection of entities (i.e.… read more

Neither BindingResult nor plain target object available as request attribute

February 21, 2015 by

If you are trying to bind a Spring MVC form to a bean, then you might have come across the below exception. Neither BindingResult nor plain target object for bean name ‘mybean’ available as request attribute Some tutorials claim that you can do like this: @Controller public class PersonController { @RequestMapping(value = "/person/add", method =… read more