Re: [appfuse-user] Hibernate cascade delete not working

2007-08-24 Thread kla
Figured it out... It had to do with me setting the inverse='true' on the Document side of the relationship. By moving inverse='true' to the 'documents' Set under class 'Project', it allowed the Document instance to manage the relationship. Great explanation of it here: http://simoes.org/docs/hi

Re: [appfuse-user] Hibernate cascade delete not working

2007-08-24 Thread kla
Thanks for the suggestion. I did try this but it didn't work. But...then I looked closer at the log...What is actually happening is that Hibernate is trying to delete: document_project - which is okay. document - which is okay too... then the project! - NOT okay. Can anyone see, based upon my m

Re: [appfuse-user] Hibernate cascade delete not working

2007-08-23 Thread Dale Newfield
I've found that due to the iterative nature of cascades, in order to get everything working I sometimes needed to drop the "not null" constraint on the children objects so they could handle the parent getting deleted first, then the child. (Otherwise when the parent is deleted, but it hasn't y

[appfuse-user] Hibernate cascade delete not working

2007-08-23 Thread kla
I have a optional one to many relationship between a project and a document. I have tied these records together using a 3rd an associative table: project : project_id document : document_id project_document : project_document_id, project_id, document_id I'm trying to delete a document but am get