Skip to content

Conversation

@dholubek
Copy link
Contributor

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.

image

image

ConceptRecord conceptRecord = (ConceptRecord) (Object) value;
entityProperty.set(Entity.getFast(conceptRecord.nid()).toProxy());
}
entityProperty.set(value);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@dukke dukke left a 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);
}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@carldea carldea merged commit 01d84a0 into ikmdev:main May 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants