-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52954/#review152953
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java (line 486)
<https://reviews.apache.org/r/52954/#comment222143>

    comment needs to be changed for supported type  from foreignKeyRef to 
mappedFromRef


- Suma Shivaprasad


On Oct. 17, 2016, 7:24 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52954/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2016, 7:24 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-1227
>     https://issues.apache.org/jira/browse/ATLAS-1227
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added support for constraints in entity attributes. Following 2 constraints 
> are added in this patch, which provide equivalent of isComposite and 
> reverseAtributeName fields in AttributeInfo: foreignKey, mappedFromRef.
> 
> Using these constraints, hive_column.table and hive_table.columns would be 
> modeled as below:
> 
> {
>   "name": "hive_column",
>   "attributeDefs": [
>     {
>       "name": "table",
>       "typeName": "hive_table",
>       "constraintDefs": [
>         {
>           "type": "foreignKey",
>           "params": {
>             "onDelete": "cascade"
>           }
>         }
>       ]
>     }
>   ]
> }
> 
> {
>   "name": "hive_table",
>   "attributeDefs": [
>     {
>       "name": "columns",
>       "typeName": "array<hive_column>",
>       "constraintDefs": [
>         {
>           "type": "mappedFromRef",
>           "params": {
>             "refAttribute": "table"
>           }
>         }
>       ]
>     }
>   ]
> }
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 
> 55bff2b 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 8813542 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 264e9a8 
>   intg/src/test/java/org/apache/atlas/type/TestAtlasEntityType.java 5b38e3c 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java
>  ea1b03b 
> 
> Diff: https://reviews.apache.org/r/52954/diff/
> 
> 
> Testing
> -------
> 
> - added unit tests
> - verified that existing isComposite/reverseAttributeName fields are mapped 
> to constraints correctly (when accessing entity-def via TypesREST API)
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>

Reply via email to