-
Notifications
You must be signed in to change notification settings - Fork 261
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
[BUG] Parent category does not change when category is updated in OMAS Subject-Area #5816
Comments
@davidradl, Is there any movement on the issue? |
@Inventoroz I have just had a quick look. The code only update the category bean content - it does not update the parent category or parent glossary. Those fields were intended mostly for gets. I can see that the API as documented does not indicate that this is the way it works. we have 2 options : 1- document this is working as designed. I am going to look today at option 2. Of course you can always work with the relationships directly to delete the existing one and add the new one. |
@davidradl, I think it's better to do it according to option 2. This will be similar to the situation when we update the parent for the term |
@Inventoroz Agreed - I am thinking that if the existing category has a parent and the update request a null parent with isReplace=true - then I should remove the parent. is= false I would not remove the parent in this case. |
Signed-off-by: David Radley <[email protected]>
@Inventoroz I have a draft fix in the associated pr . It fails on one of the junits at the moment. If you want to review it and feedback - feel free. |
Signed-off-by: David Radley <[email protected]>
Is there an existing issue for this?
Current Behavior
in Request
"parentCategory" : {
"type" : "Category",
"guid" : "184644cc-c4ff-4470-a690-0ecdb10f1300"
}
Return in Response
"parentCategory" : {
"type" : "Category",
"name" : "XQ2EG7DNE0",
"qualifiedName" : "LCSN56U4CW@a50931a1-a68a-40a9-bc24-578c9b09906f",
"guid" : "f078ff61-5df9-4083-9bcf-5bc2feb16a40",
"relationshipguid" : "2ba92e6f-910b-4672-b1a8-773c114ccf6f"
}
}
Expected Behavior
Return ParentCategory must equals Request ParentCategory
Steps To Reproduce
PUT https://1.2.3.4:9443/servers/xxx/open-metadata/access-services/subject-area/users/test/categories/209e75c1-2dca-4768-87ec-0ade461ad98b?isReplace=false
{
"class" : "Category",
"nodeType" : "Category",
"name" : "Топовый раздел",
"readOnly" : false,
"description" : "Самое лучшее описание раздела",
"classifications" : [ ],
"glossary" : {
"type" : "Glossary",
"guid" : "634cf473-e420-4786-bd01-7127ceca06f5"
},
"parentCategory" : {
"type" : "Category",
"guid" : "184644cc-c4ff-4470-a690-0ecdb10f1300"
}
}
200 OK
{
"class" : "SubjectAreaOMASAPIResponse",
"relatedHTTPCode" : 200,
"result" : [ {
"class" : "Category",
"nodeType" : "Category",
"name" : "Топовый раздел",
"qualifiedName" : "Топовый раздел@e033f334-a94f-4358-a050-0fd53fe22b70",
"systemAttributes" : {
"status" : "ACTIVE",
"createdBy" : "test",
"createTime" : 1633940943155,
"version" : 1,
"guid" : "209e75c1-2dca-4768-87ec-0ade461ad98b"
},
"readOnly" : false,
"description" : "Самое лучшее описание раздела",
"classifications" : [ ],
"glossary" : {
"type" : "Glossary",
"name" : "R-o-o-t 1G2l3o4s5s6a7r8y9",
"qualifiedName" : "R-o-o-t 1G2l3o4s5s6a7r8y9@81db59ff-eed7-4a18-9d76-dd011543cdb2",
"guid" : "634cf473-e420-4786-bd01-7127ceca06f5",
"relationshipguid" : "72e3e961-329a-4c09-b1f6-487de0cc79d2"
},
"parentCategory" : {
"type" : "Category",
"name" : "XQ2EG7DNE0",
"qualifiedName" : "LCSN56U4CW@a50931a1-a68a-40a9-bc24-578c9b09906f",
"guid" : "f078ff61-5df9-4083-9bcf-5bc2feb16a40",
"relationshipguid" : "2ba92e6f-910b-4672-b1a8-773c114ccf6f"
}
} ]
}
Environment
Any Further Information?
No response
The text was updated successfully, but these errors were encountered: