When I've hit this problem in the past, it's been either (1) the result of an unsatisfied foreign key constraint, In the former case, the solutions suggested to me were either (a) turn off database constraints or (b) write a delegate to intercept and re-order these queries. The Right Way is (b) i think, but I haven't figured out how to do that yet, so (a) it is.