Fixed a bug where only database entities with a generated id could be used. This fixed looks for both the annotations generatedId and id