PhoenixKitCatalogue.Schemas.ManufacturerSupplier (PhoenixKitCatalogue v0.18.0)

Copy Markdown View Source

Join table linking manufacturers to suppliers (many-to-many).

Both sides are FEDERATED references since core V180: a {uuid, source} pair where source is "local" (a catalogue directory row) or "crm_company" (a CRM party). V180 dropped the two foreign keys that made this graph local-only, which also dropped their ON DELETE CASCADE — so Catalogue.delete_supplier/2 and delete_manufacturer/2 clear links explicitly now.

The belongs_to associations are kept for the local case, which is still what a catalogue-standalone install has. Do not preload them for a CRM- sourced row: the uuid has no matching local record, so the association silently yields nil. Resolve through Suppliers.resolve/1 / Manufacturers.resolve/1 instead, exactly as items do.

Summary

Types

t()

@type t() :: %PhoenixKitCatalogue.Schemas.ManufacturerSupplier{
  __meta__: term(),
  inserted_at: term(),
  manufacturer: term(),
  manufacturer_source: term(),
  manufacturer_uuid: term(),
  supplier: term(),
  supplier_source: term(),
  supplier_uuid: term(),
  updated_at: term(),
  uuid: term()
}

Functions

changeset(record, attrs)