Hi,

I'm using Object API and let orient generate a schema for me with 
the objectDatabaseTx.getMetadata().getSchema().generateSchema() method.

If there is a link to another class, it adds it as a property link, but not 
as an in/out graph relation:

public class Login extends BasePersistentObject {

    private User belongsTo;

    private String username;

    private String passwordHash;
... more stuff

orientdb {db=orientdbtest}> info class Login

Class................: Login
Super class..........: BasePersistentObject
Default cluster......: login (id=117)
Supported cluster ids: [117]
Cluster selection....: round-robin
PROPERTIES
-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+
 NAME                          | TYPE        | LINKED TYPE/CLASS           
  | MANDATORY | READONLY | NOT NULL |    MIN    |    MAX    | COLLATE  |
-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+
 username                      | STRING      | null                         
 | false     | false    | false    |           |           | default  |
 belongsTo                     | LINK        | User                         
 | false     | false    | false    |           |           | default  |
 passwordHash                  | STRING      | null                         
 | false     | false    | false    |           |           | default  |
-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+

It has some data:

orientdb {db=orientdbtest}> select from Login

----+------+------+--------+------------+---------+------------------------------------
#   |@RID  |@CLASS|username|passwordHash|belongsTo|persistentObjectUuid     
           
----+------+------+--------+------------+---------+------------------------------------
0   |#117:0|Login |admin   |somepass    |#120:0   
|0820df47-e52b-4050-a876-7c2f8375bc07
...
And we see the belongsTo link is ok, but when I query for out relations it 
gives nothing:

orientdb {db=orientdbtest}> select out() from Login

----+------+----
#   |@CLASS|out 
----+------+----
0   |null  |[0] 

Is there a way to have the schema be generated with relations? Or am I 
misunderstanding something here?

Thanks,
Wouter


-- 

--- 
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