def sqlmodel_field_has_primary_key(field: Any) -> bool:
    """Determines if a field is a priamary.

    Args:
        field: a rx.model field

    Returns:
        If field is a primary key (Bool)
    """
    if getattr(field.field_info, "primary_key", None) is True:
        return True
    if getattr(field.field_info, "sa_column", None) is None:
        return False
    return bool(getattr(field.field_info.sa_column, "primary_key", None))
Determines if a field is a priamary.

    Args:
        field: a rx.model field

    Returns:
        If field is a primary key (Bool)
    
reflex/utils/compat.py