Skip to content

fix: sequelize field shadowing in models #1122

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tmigone
Copy link
Member

@tmigone tmigone commented May 23, 2025

This fixes an issue where model public fields shadow sequelize setters/getters making models's actual data undefined.

indexer-agent  | (sequelize) Warning: Model "IndexingRule" is declaring public class fields for attribute(s): "id", "identifier", "identifierType", "allocationAmount", "allocationLifetime", "autoRenewal", "parallelAllocations", "maxAllocationPercentage", "minSignal", "minStake", "maxSignal", "minAverageQueryFees", "custom", "decisionBasis", "requireSupported", "safety", "protocolNetwork", "createdAt", "updatedAt".
indexer-agent  | These class fields are shadowing Sequelize's attribute getters & setters.
indexer-agent  | See https://sequelize.org/main/manual/model-basics.html#caveat-with-public-class-fields

For details see https://sequelize.org/docs/v6/core-concepts/model-basics/#caveat-with-public-class-fields

@github-project-automation github-project-automation bot moved this to 🗃️ Inbox in Indexer May 23, 2025
@tmigone tmigone requested a review from dwerner May 23, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🗃️ Inbox
Development

Successfully merging this pull request may close these issues.

1 participant