-
Notifications
You must be signed in to change notification settings - Fork 39
Feature/finished/iia 2029 edit pattern field throws exceptions #468
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
Feature/finished/iia 2029 edit pattern field throws exceptions #468
Conversation
| ConceptRecord conceptRecord = (ConceptRecord) (Object) value; | ||
| entityProperty.set(Entity.getFast(conceptRecord.nid()).toProxy()); | ||
| } | ||
| entityProperty.set(value); |
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.
This looks odd to me.
Should the if condition return? It's setting entityProperty.set() twice.
We should ask for a second opinion from the data team.
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.
there are times when it is one data type and times when it is another... ie ConceptRecord and EntityFacade.
dukke
left a comment
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.
Nice work fixing this however I find having database classes inside the custom controls not ideal. I think as a design goal it's better to keep the custom controls as much decoupled from the rest of Komet as possible, especially database objects.
| entityProperty.set(Entity.getFast(conceptRecord.nid()).toProxy()); | ||
| } | ||
| entityProperty.set(value); | ||
| } |
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.
I wouldn't put this code here. Can we possibly get it into somewhere else?
IMO the control should be as much as possible decoupled from the rest of Komet.
So, as much as possible not have it use any of Komets classes, especially database objects.
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.
the controls already have EntityFacade typed in them.
https://ikmdev.atlassian.net/browse/IIA-2029
Fixes defects around patterns and the UI concept component control. Basically there were different datatypes besides EntityProxy or EntityFacade that can get into that control and/or get muddled at save/update time. This addresses that.