I need to set an EntityObject\'s EntityKey. I know its type and its id value. I don\'t want to query the database unnecessarily.
This works...
//
//
I had the same problem, while it was working on other pages. I dont know if this comment will be useful... But I finally discovered, that in my objet (the equivalent of your Departement), my "Id" was not appearing in the form...
Just the fact to add it (while I had removed it...) on my form has resolved my problem. (with the style="visibility:hidden", in order not to see him...)