Need to fetch asset attributes values which store within Edge properties #785
Unanswered
ajmal-yazdani
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have below relationship between AssetType, Asset and Attribute. For a AssetType I have more than one Asset and each Asset has a relationship with Attribute and the Attribute value stored as Edge property here,
`_assetType1 = await _g.AddV(new AssetType { Name = "Asset Type 1" }).FirstAsync();
_asset1 = await _g.AddV(new Asset { Name = "Asset 1" }).FirstAsync();
_windowsVersion = await _g.AddV(new Attribute { Name = "Version" }).FirstAsync();
I need to get all the Asset with their Attribute values which belong to a specific AssetType, how to achieve this ? please help
I tried below query, but it's give both Asset and Attribute results in 2 different array element? how to get result in single array with both Asset and Asset Attribute values?
var x = await _g .V<AssetType>().Where(at => at.Name == assetType) .Out<AssetTypeToAsset>() .As((__, asset) => __ .OutE<AssetAttributeValues>() .As((__, attribute) => __ .Select(asset, attribute)));
Beta Was this translation helpful? Give feedback.
All reactions