Skip to content

[Bug]: updateProductsWorkflow - Entity 'Product' does not have property 'category_ids' #13708

@appinteractive

Description

@appinteractive

Package.json file

{
  "name": "project-name",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "medusa"
  ],
  "scripts": {
    "build": "NODE_ENV=production medusa build",
    "seed": "medusa exec ./src/scripts/seed.ts",
    "start": "NODE_ENV=production medusa start",
    "dev": "NODE_ENV=development medusa develop",
    "debug": "NODE_OPTIONS='--inspect=9229' medusa develop",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
  },
  "dependencies": {
    "@medusajs/admin-sdk": "2.10.2",
    "@medusajs/cli": "2.10.2",
    "@medusajs/framework": "2.10.2",
    "@medusajs/medusa": "2.10.2",
    "@mikro-orm/core": "6.4.3",
    "@mikro-orm/knex": "6.4.3",
    "@mikro-orm/migrations": "6.4.3",
    "@mikro-orm/postgresql": "6.4.3",
    "@radix-ui/react-progress": "^1.1.7",
    "@untitledui/file-icons": "^0.0.9",
    "@untitledui/icons": "^0.0.19",
    "awilix": "^8.0.1",
    "motion": "^12.23.12",
    "multer": "^2.0.2",
    "pg": "^8.13.0",
    "react-aria": "^3.42.0",
    "react-aria-components": "^1.12.0",
    "tailwind-merge": "^3.3.1",
    "untitledui": "0.1.44"
  },
  "devDependencies": {
    "@medusajs/test-utils": "2.10.2",
    "@mikro-orm/cli": "6.4.3",
    "@swc/core": "1.5.7",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/multer": "^2.0.0",
    "@types/node": "^20.0.0",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.2.11",
    "yalc": "^1.0.0-pre.53"
  },
  "engines": {
    "node": ">=20"
  },
  "packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}

Node.js version

v22.16.0

Database and its version

Postgres 17

Operating system name and version

MacOS 15.5 (24F74)

Browser name

No response

What happended?

When trying to update a product inside a workflow, I can't pass the documented cateogry_ids I always get following error: Entity 'Product' does not have property 'category_ids'. The Docs AI also runs in circles telling me thats not in the docs but it is, as well as in the TypeScript types.

https://docs.medusajs.com/resources/references/medusa-workflows/updateProductsWorkflow (by the way the deeplinks are broken when opening the url with them it crashes to the vercel timeout error page)

updateProductsWorkflow.runAsStep({
  input: {
    selector: { id: input.product.id },
    update: {
      title: input.product.title,
      subtitle: input.product.subtitle,
      handle: input.product.handle,
      description: input.product.description,
      status: input.product.status,
      type_id: input.product.type_id,
      category_ids: input.product.category_ids,
      metadata: input.product.metadata,
    },
  },
})

Expected behavior

The product should be associated to the given categories like described in the docs.

Actual behavior

Entity 'Product' does not have property 'category_ids'

Link to reproduction repo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions