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

[BUGFIXE] Pouvoir remettre à zéro une compétence et relancer sans problème. #586

Closed
wants to merge 1 commit into from

Conversation

MelanieMEB
Copy link
Member

🦄 Problème

Décrivez ici le besoin ou l'intention couvert par cette Pull Request.

🤖 Solution

Ajoutez à cet endroit, si nécessaire, des détails concernant la solution technique retenue et mise en oeuvre, des difficultés ou problèmes rencontrés.

🌈 Remarques

Des infos supplémentaires, trucs et astuces ?

.find((competenceEvaluation) => competenceEvaluation.get('competenceId') === competenceId);
if (competenceEvaluation) {
return competenceEvaluation;
const competenceEvaluation = await this.store.query('competenceEvaluation', { filter: { competenceId } });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi remplacer peekAll par query?

@sbedeau
Copy link
Contributor

sbedeau commented Jun 28, 2019

Ça marche pas ça ?

Well, there's an undocumented requirement that causes this issue. Whether it's an actual code bug or a documentation issue is up for interpretation.

You have to actively push all changes you get in an adapter back into the store from that adapter, otherwise the relationships of a changed record (unlike the attributes) will be in an unsaved state. This causes leaked objects all over the place, including the ids of deleted records.

avec record.unloadRecord();

@MelanieMEB MelanieMEB closed this Jul 1, 2019
@MelanieMEB MelanieMEB deleted the bug-reset-competence branch July 1, 2019 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants