Entity only gets an id if present in manager

fixes bug #20