My problem is that I have to update a field of an object based on ID field.
There are some eager loaded collections/objects in that object.So, If i load that object either using get/load or using Criteria then it will load all the child objects also.
If I use Projections to have only the column I want, it returns me String but I want the object to be returned somehow so that I can just set its field to updated value and use hibernate’s automatic dirty checking feature.
So, could anybody please let me know how can I achieve that without writing SQL query?
How about using jpql to update the field?
e.g.
like it is done in this example:
http://docs.oracle.com/cd/E13189_01/kodo/docs41/full/html/ejb3_langref.html#ejb3_langref_bulk_ops