fix: the entity's id could be declared in a super class

Change-Id: I1c6d8742c3479e0f1403d94a36231eb59fb4a4be