Declare the property as embedded in the schema, or use the type on the fly while setting the property:
doc.field( "city", new ODocument("City").field("name","Rome").field("country", "Italy"),
OType.EMBEDDED)
Embedded documents hasn't own RID.