(refs #16)Fixed foreign key constraint problem in repository deletion.