I got a problem that is very weird.. This is the situation:
I have two classes: Code and FinancialMove. The FinancialMove has a Code (many moves to one code).
There are two codes in the db and just one of them is related to a registered FinancialMove.
If I try to remove the "unrelated" code it works, but if I try to remove the related one before it throws the exception (which is correct) then I try to remove that first one but it also says that this code is related to some financialmove.
Do you guys have any idea of what's happening?