[ 
https://issues.apache.org/jira/browse/ATLAS-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Radley updated ATLAS-1980:
--------------------------------
    Description: 
Using a model RelationshipDef that is defines
 {
         "name": "CategoryAnchor",
         "typeVersion": "1.0",

         "endDef1": {
           "name": "categories",
           "type": "Glossary",
           "cardinality":"SET",
            "isContainer":true
         },
         "endDef2": {
           "name": "anchor",
           "type": "GlossaryCategory",
           "cardinality":"SINGLE"
         },
         "relationshipCategory":"COMPOSITION",
         "propagateTags":"NONE"
     },


- I can create a relationship then add the same GlossayCategory to another 
glossary. Both edges then exist. There should be only one allowed due to the 
RelationshipDef cardinality. This should be rejected.
- it does not check that the guid of the relationship is actually of the right 
type. If I create an instance of the above relationships passing 2 
GlossaryCategory  guids ; it works. This should be rejected.

  was:
When I am playing with creating relationship instances I get this error : {
    "errorCode": "ATLAS-400-00-01A",
    "errorMessage": "invalid parameters: found null entity"
}

This needs to be more descriptive. I have not clue what I have done wrong. The 
code logic is : 
"
 while (entityStream.hasNext()) {
            AtlasEntity entity = entityStream.next();

            if (entity == null) {
                throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, 
"found null entity");
            }
"
It doesn't not seem we should get the next entity in a stream and it be null . 
Normally in java collections if hasNext() is true, the next() should give an 
non null element.  



> Improve validations for relationships
> -------------------------------------
>
>                 Key: ATLAS-1980
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1980
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: David Radley
>            Assignee: David Radley
>
> Using a model RelationshipDef that is defines
>  {
>          "name": "CategoryAnchor",
>          "typeVersion": "1.0",
>          "endDef1": {
>            "name": "categories",
>            "type": "Glossary",
>            "cardinality":"SET",
>             "isContainer":true
>          },
>          "endDef2": {
>            "name": "anchor",
>            "type": "GlossaryCategory",
>            "cardinality":"SINGLE"
>          },
>          "relationshipCategory":"COMPOSITION",
>          "propagateTags":"NONE"
>      },
> - I can create a relationship then add the same GlossayCategory to another 
> glossary. Both edges then exist. There should be only one allowed due to the 
> RelationshipDef cardinality. This should be rejected.
> - it does not check that the guid of the relationship is actually of the 
> right type. If I create an instance of the above relationships passing 2 
> GlossaryCategory  guids ; it works. This should be rejected.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to