Valid 1Z0-898 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-898 Exam! ExamDiscuss.com now offer the newest 1Z0-898 exam dumps, the ExamDiscuss.com 1Z0-898 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-898 dumps with Test Engine here:
An application has two entities, parson and Address. The application calls the DeletePersonsByStatus named query. Which of the following is true?
Correct Answer: A
Explanation/Reference: This is a known issue, hibernate does not perform cascade delete via HQL. If you load the object and delete it using session.delete(object); then the cascade relations are respected. Not via HQL. You have either of the 3 options. * Load them and call session.delete(); * Load all the child items via HQL, delete them, and then the real objects. * Put a cascade link at the database level. So when you delete it, the DB will take care of it. Reference: hibernate doesn't remove child with named query, but removes with session.delete() http://stackoverflow.com/questions/4275291/hibernate-doesnt-remove-child-with-named-query-but- removes-with-session-delete