Avoid Microsoft lack of getPrimaryKey