Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
f070d924
Commit
f070d924
authored
Apr 10, 2019
by
kirankumar D G
Committed by
Madhan Neethiraj
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3084: setting default value to the relationship attributes
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
39b059e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
AtlasRelationshipStoreV2.java
...s/repository/store/graph/v2/AtlasRelationshipStoreV2.java
+11
-2
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java
View file @
f070d924
...
...
@@ -427,6 +427,16 @@ public class AtlasRelationshipStoreV2 implements AtlasRelationshipStore {
if
(
relationship
.
hasAttribute
(
attrName
))
{
AtlasGraphUtilsV2
.
setEncodedProperty
(
relationshipEdge
,
attrVertexProperty
,
relationship
.
getAttribute
(
attrName
));
}
else
{
String
defaultValue
=
attr
.
getAttributeDef
().
getDefaultValue
();
if
(
StringUtils
.
isNotEmpty
(
defaultValue
))
{
Object
attrValue
=
attr
.
getAttributeType
().
createDefaultValue
(
defaultValue
);
if
(
attrValue
!=
null
)
{
AtlasGraphUtilsV2
.
setEncodedProperty
(
relationshipEdge
,
attrVertexProperty
,
attrValue
);
}
}
}
}
}
...
...
@@ -880,4 +890,4 @@ public class AtlasRelationshipStoreV2 implements AtlasRelationshipStore {
entityChangeNotifier
.
notifyRelationshipMutation
(
ret
,
relationshipUpdate
);
}
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment