Automatic EntityID generation