Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Linking to entity via custom field instead of Id. #254

Open
ilnytskyi opened this issue Apr 17, 2024 · 0 comments
Open

[Feature] Linking to entity via custom field instead of Id. #254

ilnytskyi opened this issue Apr 17, 2024 · 0 comments

Comments

@ilnytskyi
Copy link

Hello,

I am looking for the solution to link a comment with content type via custom field instead of id.
In my case content type changes it's state and goes to history as snapshot, then replaced with new entity still accessible via same slug and other data. However due to primary id change it's hard to maintain comments.

As I see comments only linked via id in

https://github.com/VirtusLab-Open-Source/strapi-plugin-comments/blob/master/server/services/client.ts#L68

const relatedEntity = await strapi.db
      .query<RelatedEntity>(uid)
      .findOne({ where: { id: relatedId } });

Is there a way to configure the linking field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant