Updated GetPrimaryKeyField to use base type