An application will be developed that requires a user to log into the site. Once the user has logged in, the user’s previous data will be retrieved from the database. Once a bean has been retrieved from the database, any changes to that bean will replace the data that is already in the database, instead of adding a new row. Hibernate determines if a bean has already been written to the database by looking at the primary key. If the primary key has not been set, then Hibernate will add the bean to the database; if the primary key is not null, then Hibernate will update the corresponding row in the database.
Unable to display preview. Download preview PDF.