From: bdaw <nu...@jb...> - 2005-07-31 15:33:21
|
The mappings are as they were. When I tried to change it to one-to-one there were additional problems and it seems that they are correct. There were no problems with deleting "middle" post. Only when deleting post to which there is reference in topic.lastPost or topic.fistPost properties there is foreign key constrain error. It's strange as there is cascade="none" set in mappings. What I did is some corrections in DeletePostCommand.java (set last/first post to null in topic before removal) and in ForumsModuleImpl.java (session.flush() before post/topic delete). It's not beautiful but in future lastPost and firstPost will be replaced: http://jira.jboss.com/jira/browse/JBPORTAL-336 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3887583#3887583 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3887583 |