try (final Tx tx = app.tx()) {
itemNode = app.create(SchemaNode.class, new NodeAttribute(SchemaNode.name, "Item"));
final PropertyMap properties = new PropertyMap();
properties.put(SchemaRelationship.relationshipType, "CHILD");
properties.put(SchemaRelationship.sourceMultiplicity, "1");
properties.put(SchemaRelationship.targetMultiplicity, "*");
properties.put(SchemaRelationship.sourceJsonName, "parentItem");
properties.put(SchemaRelationship.targetJsonName, "children");
app.create(itemNode, itemNode, SchemaRelationship.class, properties);
// compile the stuff
tx.success();