java - Relationship in schemaless OrientDb -


in schema-less how made relationship: embedded or referenced?

i can read in odocument api if use method

public odocument field(string ifieldname,           object ipropertyvalue,           otype ifieldtype) 

to add new field, force field type instead of auto-determined. guess function can chose type of relationship. but, if don't use method, way auto-determine relationship type?

in example:

odocument doc = new odocument("person"); doc.field( "name", "luke" ); doc.field( "surname", "skywalker" ); doc.field( "city", new odocument("city").field("name","rome").field("country", "italy")) 

city embedded or referenced? if it's embedded how can make referenced or vice versa?

thanks! ago!

declare property embedded in schema, or use type on fly while setting property:

doc.field( "city", new odocument("city").field("name","rome").field("country", "italy"),                 otype.embedded) 

embedded documents hasn't own rid.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -