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

Refactor: Question domain entity should not has option list because option domain entity is a aggregate root also #2318

Open
xurxodev opened this issue Oct 26, 2018 · 1 comment

Comments

@xurxodev
Copy link
Contributor

No description provided.

@xurxodev
Copy link
Contributor Author

xurxodev commented Oct 26, 2018

This is a problem in CNM because when org unit tree question is loaded in screen in DynamicTabAdapter line 622 we to realize this code:
if(questionView instanceof CommonQuestionView){
((CommonQuestionView) questionView).setQuestion(QuestionMapper.mapFromDbToDomain(screenQuestionDB));
}
This code is added for connect RegExpValidations.
This code realize one query per option to load option attributes during question mapping
For release c0.5 in cnm to avoid slow performance (issue #2309) we refactor the above code to:
if(questionView instanceof CommonQuestionView && requireQuestionOptionValidations(questionView)){
((CommonQuestionView) questionView).setQuestion(QuestionMapper.mapFromDbToDomain(screenQuestionDB));
}

Please when this issue is realized remove requireQuestionOptionValidations condition

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

No branches or pull requests

2 participants