Hello Abdallah,
It is because the entity Department is non-persistent. Change it to persistent.
Go make it
Due to limitations, like reference selector, etc., suggest to use persistable entities only where you need them, don’t commit your changes and avoid any auto-commit actions. Ideally, rollback all changes if you don’t need those objects in memory any longer. Enabling entity persistence will create table(s) in the database, however no data will be saved for as long as it’s not (auto-) committed.
Consider posting your idea to extend reference selector for non-persistable entities.