add the ability to set the fieldname used to get the entity by (default ...

...= id)