Hi,
How to delete objects using Hibernate? I want to delete an object (record) in table.
Thanks
Hi,
Hibernate Session API provides function to delete object.
For deleting an object we have to use following function:
session.delete(emp);
Above function will look for primary key from the object and then run the SQL query using JDBC API.
Check following tutorial for complete example code:
Hibernate Session.delete() Example.
Thanks
Ads