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

Remove 'name' attribute from relationship type #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brandones
Copy link
Contributor

@mogoodrich pointed out that the "name" attribute of relationship types isn't actually stored in the database.

Attn @mks-d

@@ -29,7 +29,6 @@ public void load_shouldLoadRelationshipTypesAccordingToCsvFiles() {
{
RelationshipType rt = ps.getRelationshipTypeByUuid("c86d9979-b8ac-4d8c-85cf-cc04e7f16315");
Assert.assertNotNull(rt);
Assert.assertEquals("Uncle/Nephew", rt.getName());
Copy link
Member

Choose a reason for hiding this comment

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

the "name" attribute of relationship types isn't actually stored in the database

@mogoodrich / @brandones how come such asserts (that you have suggested to remove) would have worked until now then?

If you look at the test above, it's fetching a relationship type by UUID and that fetched relationship type does carry a name...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would guess that that's an artifact of the test environment. Or something related to the Hibernate cache. It is easy enough to verify that the database model has no name attribute: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/resources/org/openmrs/api/db/hibernate/RelationshipType.hbm.xml

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.

None yet

2 participants