-
Notifications
You must be signed in to change notification settings - Fork 87
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
Calculated fields #1539
Calculated fields #1539
Conversation
/integration sha=c9dcfc3c4768ff9098f4d1d766f91e7018c85046 |
PR Summary
|
⌛ Integration tests are running... Check their status here 👈 |
const isArray = part.endsWith('[]') | ||
const key = isArray ? part.slice(0, -2) : part | ||
if (!current[key]) { | ||
current[key] = isArray ? { __isArray: true, __children: {} } : {} |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
library input
❌ Oh no! Integration tests have failed |
6 similar comments
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
/integration sha=e815183 |
⌛ Integration tests are running... Check their status here 👈 |
❌ Oh no! Integration tests have failed |
/integration sha=7d65cb3 |
⌛ Integration tests are running... Check their status here 👈 |
❌ Oh no! Integration tests have failed |
6 similar comments
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
❌ Oh no! Integration tests have failed |
7d65cb3
to
008414c
Compare
/integration sha=008414c64635315ceda16888eaf39c0d73161b9e |
❌ Oh no! Integration tests have failed |
/integration sha=3b899a6bc06d65be4f1f2bf59f3becb67abe995e |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
/integration sha=85ea3c15ed9f3acf080593bec19df41e4bff93fe |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
/integration sha=56633030c1307dc0adf1bc187387e69731cbc387 |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job! Just a small comment about UX
packages/framework-integration-tests/src/read-models/cart-read-model.ts
Outdated
Show resolved
Hide resolved
/integration sha=2077b2cb598e6b6259ef8e2d1b6756e8cead1f53 |
⌛ Integration tests are running... Check their status here 👈 |
❌ Oh no! Integration tests have failed |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
Description
Due to the changes introduced in version 2.11.0, this PR introduces the
@CalculatedField
decorator for read model fields, which are calculated using getters using other properties of the read model. e.g.,This decorator receives a list of the read model's properties as an input parameter. The calculated field uses these properties to calculate its value. The decorator ensures that these properties are fetched from the database so that the calculated field is calculated correctly, even if the user did not explicitly request these dependencies.
Changes
CalculatedField
decorator to theframework-core
package, which stores the calculated fields and their dependencies in the read model's metadata.search
method in theBoosterReadModelsReader
class so it handles calculated fields accordingly.cli
package due to updated Node types.Checks