Re: Relationships to struct fields

2018-02-20 Thread Pierre Padovani
So we have a set of types that represent a property graph schema. The edge
type contains a struct that defines the 'type' of the edge and contains
three values:
- label
- fromVertexType
- toVertextType

The idea being that the triplet defines the unique id of the edge type. The
fromVertexType and toVertexType were to be represented as relationships to
other defined vertex types. We intended to use the relationships in Atlas
as a way to enforce the schema correctness. We stored the three values in a
struct to provide an easy way to structure and group the data.

On Tue, Feb 20, 2018 at 8:41 AM, David Radley <david_rad...@uk.ibm.com>
wrote:

> Hi Pierre,
> That is not the way we have implemented the relationships. It is only
> possible to have relationships between 2 entities. I think this makes
> sense to restrict to entities. I am interested why you need this and
> whether there are alternative ways to model what you need,  all the best,
> David.
>
>
>
> From:   Pierre Padovani <pierre.padov...@civitaslearning.com>
> To: dev@atlas.apache.org
> Date:   20/02/2018 14:26
> Subject:Relationships to struct fields
>
>
>
> Quick question, as I could not find any documentation that asserts this is
> a valid use case or not.
>
> I have a type with a struct. I'd like to create a relationship from a
> field
> in the struct to another type.
>
> Is this even possible?
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>


Re: Relationships to struct fields

2018-02-20 Thread Mandy Chessell
Hello Pierre,
It does depend on the level of Atlas you are using. 
In the latest build,  I am sorry, this is not supported.  If you need 
this, then convert the Struct into an Entity.  The Relationship then 
represents the attribute in each of the entities it is connecting.

Older versions of Atlas did support this.  However it was removed in 
mid-2017 when the new Relationship support was added.

All the best
Mandy
___
Mandy Chessell CBE FREng CEng FBCS
IBM Distinguished Engineer

Master Inventor
Member of the IBM Academy of Technology
Visiting Professor, Department of Computer Science, University of 
Sheffield

Email: mandy_chess...@uk.ibm.com
LinkedIn: http://www.linkedin.com/pub/mandy-chessell/22/897/a49

Assistant: Janet Brooks - jsbrook...@uk.ibm.com



From:   Pierre Padovani <pierre.padov...@civitaslearning.com>
To: dev@atlas.apache.org
Date:   20/02/2018 15:26
Subject:    Relationships to struct fields



Quick question, as I could not find any documentation that asserts this is
a valid use case or not.

I have a type with a struct. I'd like to create a relationship from a 
field
in the struct to another type.

Is this even possible?




Re: Relationships to struct fields

2018-02-20 Thread David Radley
Hi Pierre,
That is not the way we have implemented the relationships. It is only 
possible to have relationships between 2 entities. I think this makes 
sense to restrict to entities. I am interested why you need this and 
whether there are alternative ways to model what you need,  all the best, 
David. 



From:   Pierre Padovani <pierre.padov...@civitaslearning.com>
To: dev@atlas.apache.org
Date:   20/02/2018 14:26
Subject:    Relationships to struct fields



Quick question, as I could not find any documentation that asserts this is
a valid use case or not.

I have a type with a struct. I'd like to create a relationship from a 
field
in the struct to another type.

Is this even possible?



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Relationships to struct fields

2018-02-20 Thread Pierre Padovani
Quick question, as I could not find any documentation that asserts this is
a valid use case or not.

I have a type with a struct. I'd like to create a relationship from a field
in the struct to another type.

Is this even possible?