----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60272/#review178889 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java Lines 99 (patched) <https://reviews.apache.org/r/60272/#comment253226> Is it necessary to create the second edge between a pair of relationshipDefVertex and entityTypeVertex when the endpoint names are different? I think it is not necessary; the condition in line #99 should be: "if (!type1.equals(type2)) {". Please review. - Madhan Neethiraj On June 26, 2017, 12:29 p.m., David Radley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60272/ > ----------------------------------------------------------- > > (Updated June 26, 2017, 12:29 p.m.) > > > Review request for atlas, Madhan Neethiraj and Sarath Subramanian. > > > Repository: atlas > > > Description > ------- > > ATLAS-1891 > Additional validation checks for relationshipDefs and add edges between > entityDefs and relationshipDef vertices > > - for create check reserved words are not used on the endpoints and type name > and relationship attribute names > - for update do not allow updates to endpoints or the name or deletion of > attributes or relationship category > - for not allow deletion of an entityDef that has a relatiionshipDef > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/AtlasErrorCode.java > 70480df113db36cb938a8817239fbeae441acdc0 > intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java > 31256683f4c1e3217ef4b2dba83f34c32e025435 > > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java > aefd1684fe4a71cd0b45c4600cc5eca872ab0892 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityDefStoreV1.java > 8046234f17885cb6009edbcf3f9b80333932c358 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java > 00fe94b69d69d261e37766434b0cfd1e56117c52 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java > 6992e221884db5382b89a29ea8a7efaad2cadcbc > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java > 2ba41443d7d5c51ec83848c5f9ca89720f74b63a > repository/src/test/java/org/apache/atlas/TestModules.java > d28956deb349c65d11031dbfb3866b91d5fd37e4 > > repository/src/test/java/org/apache/atlas/repository/store/graph/AtlasRelationshipDefStoreV1Test.java > PRE-CREATION > > webapp/src/main/java/org/apache/atlas/examples/CreateTypesFromJsonFileUtil.java > 82d6f2e3ee3f6376b7830e11900fda4e7275375b > > webapp/src/main/java/org/apache/atlas/examples/UpdateTypesFromJsonFileUtil.java > 3b6770658298849cb70e69c373f97fb4d13d1148 > > > Diff: https://reviews.apache.org/r/60272/diff/2/ > > > Testing > ------- > > run junits > create reltionshipDef > get relationshipDef > get relationshipDef/headers > delete relationshipDef > update relationshipDef > create a relationshipDef and then update it such that an attribute will be > deleted. This should fail. > Set the config option and try to create a reltionshipDef with a reserversed > word as an attribute name - this fails > Delete an entityDef that has a relationshipdef - this fails > Create a relationship with an endpoint name as a reserved word - this fails > > > Thanks, > > David Radley > >