Split edit and create into different methods
This makes removes unneeded responsibility from the edit view and
makes it possible to more tightly restrict the usage of the edit and
create views to only creating/editing.
Patch by: Sverre Rabbelier
Add support for ID based entities
This allows entities that do not have a key name to be created and
edited without requiring the presence of a key_name.
Patch by: Sverre Rabbelier