# ListProductCategoryAssignments

## Overview

ListProductCategoryAssignments retrieves all product assignments for a given category. Used as a guard check before category deletion to enforce the constraint that categories with product assignments cannot be deleted.

## Business Rules

- Searches ProductCategoryAssignment table for all records matching the given categoryId
- Returns all matching assignment records as an array
- Returns an empty array if the category has no product assignments

## Process Flow

```mermaid
flowchart TD
    A[Receive categoryId] --> B[SELECT from ProductCategoryAssignment where categoryId = input]
    B --> C{Assignments found?}
    C -->|Yes| D[Return assignment records]
    C -->|No| E[Return empty array]
```

## External Dependencies

- None

## Error Scenarios

None

## Test Cases

- returns assignments when found
- returns empty array when no assignments
