How to create edge class target different vetex class in orientdb?

How to create edge class target different vetex class in orientdb?



enter image description hereFor example, a company has many shareholders, some are natural man, some are companies.



I need to create a edge class that target vertex type are natural man or company.



But I can only select one class in "From Vertex" dropbox





Hi, what version are you using? Could you explain better? Thx
– Michela Bonizzi
Aug 11 at 3:36





I'm using 2.2.x
– Dollyn
Aug 13 at 11:53




1 Answer
1



I don't know if I've undertsand correctly, please correct me if i'm wrong but, you want an edge that is able to connect a Shareholder (man or company) to an another company, an I right? If I am, try this:


create class Company extends V
insert into Company(name) values ("Company001"), ("Company002"), ("Company003")

create class Natuaral_Man extends V
insert into Natural_Man(name) values ("User001")

create class ShareHolderOf extends E

create edge ShareHolderOf from #22:0 to #18:0
create edge ShareHolderOf from #22:0 to #21:0
create edge ShareHolderOf from #20:0 to #21:0



this is what you get:



enter image description here



Hope it helps



Regards





hi, if we doing it this way, the source or target vertex class could be anything, without any constraint
– Dollyn
Sep 6 at 2:54






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)