This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
Can anyone tell me how the update method works for Hibernate Session?
If I pass in a POJO (which has a corresponding table in the DB) does hibernate check which fields are different from the DB and only updates only the columns which have changed or does it to a blanket update of all columns in the table.
If your entity is bound to the session, hibernate "knows" when it gets changed. By default every field is updated. But you can change that behaviour and use "dynamic update" which can save some time. E.g. when you have some large fields or blobs/clobs in your table.
I didn't check but (I think) if you want dynamic-update and the POJO isn't bound to the session hibernate does a SELECT and then creates an update.
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps