Added ability to manually specify an id for an entity.