Skip to content

[Bug]: product index filterable prop is overwritten by custom link #13674

@docloulou

Description

@docloulou

Package.json file

2.10.3

Node.js version

21

Database and its version

17

Operating system name and version

linux

Browser name

No response

What happended?

Hi,

I have a custom link with my favorites and products.

  • If I remove the link, the index includes all fields in data (see Postgres web screenshot).
  • If I add the link (see code), only the id is populated in data.

This causes a problem when running query.index with filters.
It seems that setting product as the target of the link overwrites the default filterable props (which are empty in my link).

@adrien2p may #13538 fix this issue ?

Thanks

export default defineLink(
  {
    linkable: FavoritesModule.linkable.favorites,
    deleteCascade: true,
    isList: false,
    fields: ['product_id'],
  },
  ProductModule.linkable.product,
)

lead to :

Image Image

Expected behavior

dont overwrite the default filterable props if link is done with product (or other core entities ?)

Actual behavior

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