Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.0.3
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:Oracle 8i
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
This is not a request for help debugging, I just don't know what to look for and I was hoping someone here could point me to a section of the manual that addresses my problem. I don't really care to read through the entire manual looking for a piece of functionality that may not even exist.
I am working on a piece of functionality that builds a survey. Each question is a separate object stored in the database and associated to a survey id. Adding new questions is no problem, but removing questions is because I don't know how to tell hibernate that, when I write the object back to the database that it should delete anything not present on the survey. So if I added 3 questions and decided to delete one, I delete it from my object but there is simply nothing done to it in the database when I write it back.
So my object may look something like this:
SurveyX
\-Question1
|-Question2
|-Question3
When I remove question 3 and write it back to the database, it writes:
surveyxid, question1
surveyxid, question2
but since question 3 was already there, when I get the values back, I get:
SurveyX
\-Question1
|-Question2
|-Question3
because it read question 3 because it was already there. Does hibernate have some sort of feature that knows question 3 was on the object and has been removed so it should be removed from the database? If so what is it called and where do I find the reference for how to use it in the manual?
Thanks in advance