Skip to content

fix: sequelize field shadowing in models#1122

Merged
dwerner merged 1 commit into
mainfrom
tmigone/sequelize-fix
Jun 24, 2025
Merged

fix: sequelize field shadowing in models#1122
dwerner merged 1 commit into
mainfrom
tmigone/sequelize-fix

Conversation

@tmigone

@tmigone tmigone commented May 23, 2025

Copy link
Copy Markdown
Member

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

Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
@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
@github-project-automation github-project-automation Bot moved this from 🗃️ Inbox to ✅ Approved in Indexer Jun 24, 2025
@dwerner dwerner merged commit a7c8544 into main Jun 24, 2025
5 of 8 checks passed
@dwerner dwerner deleted the tmigone/sequelize-fix branch June 24, 2025 19:13
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🚗 Merged in Indexer Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

2 participants