Multiple choice technology programming languages

What does sess.delete() do?

  1. a) remove data from in memory

  2. b) remove from database.

  3. c) remove from sessionFactory

  4. d) None of the above.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The sess.delete() method in Hibernate removes the corresponding record from the database. It marks the entity for deletion and executes the DELETE SQL statement when the transaction is committed. It doesn't just remove from memory - it's a real database operation.