PhoenixKitLocations. Schemas. LocationTypeAssignment
(PhoenixKitLocations v0.2.1)
Copy Markdown
View Source
Join table for many-to-many between locations and location types.
Summary
Functions
Builds an insert changeset for a location ↔ type assignment.
Types
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Builds an insert changeset for a location ↔ type assignment.
Casts the two FK columns + timestamps and wires assoc_constraint/2
on both :location and :location_type so an FK violation comes
back as a clean {:error, changeset} instead of an
Ecto.ConstraintError raise. Without these the Batch 3a :error-branch
activity-logging code would never fire.