Creating edge between non-vertex classes

58 views
Skip to first unread message

Anthony Hebig

unread,
Jun 16, 2015, 4:59:07 AM6/16/15
to orient-...@googlegroups.com
Hi,

I'm working with OrientDb community version 2.1-rc3. (database type is "graph")

I've been doing some tests with OrientDbStudio (and you can easily reproduce these steps) :
- create a new class : Class1 (with some properties or not), no superClass
- create a new class : Class2 (with some properties or not), no superClass

- create a new record for Class1, let's say it has the following rid : #10:0
- create a new record for Class2, let's say it has the following rid : #11:0

- then you can do this : "create edge E from #10:0 to #11:0" and it works fine.


So what's the point of extending V for a class ?

And what's the difference between the "create vertex" command and creating a new "normal" record ?

Thanks for you time :)

SavioL

unread,
Jun 16, 2015, 5:21:45 AM6/16/15
to orient-...@googlegroups.com
Hi anthony,
maybe it could help you to the answer given to a similar question concerning the extension of class V and E: "Another question on basic concepts"

For the second question, what you mean by "creating a new 'normal' record"?

regards,
Savio L.

James Wang

unread,
Jun 16, 2015, 5:30:13 AM6/16/15
to orient-...@googlegroups.com
supreclass V so you can use the ETL tool to import massive data :D

Riccardo Tasso

unread,
Jun 16, 2015, 5:34:08 AM6/16/15
to orient-...@googlegroups.com
Hi,
  the V class is a convenience to declare a document as a node of your graph. CREATE VERTEX command is simply a way to create a document inside class V.

I think that if you use graph api using classes which doesn't extend V should bring you to errors.

Cheers,
   Riccardo

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anthony Hebig

unread,
Jun 16, 2015, 8:36:06 AM6/16/15
to orient-...@googlegroups.com
In the topic "Another question on basic concepts" it is said that "when using Graph API your elements have to be instances of V and E". 
OK, but I'm just surprised there is no error at all when I create an Edge between two records that doesn't extends V.

On the other side, I have an error when I try to do "create vertex" with a class that doesn't extends V.

By "creating a new normal record" I mean a regular "insert" or with the "New record" button in OrientDb Studio

Luigi Dell'Aquila

unread,
Jun 16, 2015, 9:16:21 AM6/16/15
to orient-...@googlegroups.com
Hi Anthony,

I agree with you, that statement should result in an error. Could you please open an issue about that?

Thanks

Luigi


--

Anthony Hebig

unread,
Jun 16, 2015, 9:30:34 AM6/16/15
to orient-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages