This would still be a problem with composite IDs that contain a *-to-one because EntityType also has a reference to TypeScopeImpl (which has a reference to a session factory). That reference cannot be removed.