This is my understanding. You would need to get a letter of release from your employer, or commonly referred to a "No Objection" letter. If you don't get this, then you have to wait for 2 years before you can get a job again in this country.
There was talk about this law changing, as like you say, the employer might not be to your liking, but they have you over a barrell ... and it can be quite difficult getting this letter. You may be dismissed aswell for no valid reason and your employer does not give you your no objection letter, for no fault of your own ... everything is in their favour.

It can be done, but keep sweet with the boss!!