To answer your question literally see the first part of this response.  
However, look further down b/c I'm not sure that you want to model your 
data this way.

http://orientdb.com/docs/2.1/SQL-Create-Class.html:

>
>    - *<class>* Defines the name of the class you want to create. You must 
>    use a letter, underscore or dollar for the first character, for all other 
>    characters you can use alphanumeric characters, underscores and dollar.
>
> There's at least another restriction... you can't use a name that 
conflicts with any of the files used to store the classes (clusters).
e.g. the following class names will fail:

CREATE CLASS aaa extends V  //succeeds
CREATE CLASS aaa_1 extends V //This fails b/c orient stores aaa under aaa_1 
on the filesystem defined above

This should be noted in the documentation.  Also, I wish that these type of 
restrictions did not apply to class names.  I understand that it would make 
the command parsing and file storage more complicated but it would help in 
situations where you really need the freedom time name classes 
appropriately.


*Data Model*Ok, so I'm not sure you you are modeling this correctly.  
First, the syntax "CREATE com.someorg.somedomain.
SomeClass EXTENDS V" is incorrect.  I'm not sure if you are trying to 
create an OrientDB class or vertex.  Here's a possible way to model:

Create the schema first:
CREATE CLASS JavaPackage extends V
CREATE CLASS JavaClass extends V
CREATE CLASS Parent extends E

Create the vertices:
CREATE VERTEX JavaPackage set name="com"
CREATE VERTEX JavaPackage set name="someorg"
CREATE VERTEX JavaPackage set name="somedomain"
CREATE VERTEX JavaClass set name="SomeClass"

Create the package and class relationships using edges
CREATE EDGE Parent FROM (select from JavaPackage where name="someorg") TO 
(select from JavaPackage where name="com")
CREATE EDGE Parent FROM (select from JavaPackage where name="somedomain") 
TO (select from JavaPackage where name="someorg")
CREATE EDGE Parent FROM (select from JavaClass where name="SomeClass") TO 
(select from JavaPackage where name="somedomain")

There are other ways to do this of course so pick a way that makes sense.

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to