code: @Override
  	Map<String, Object> serialize() {
  
  		final Map<String, Object> map = super.serialize();
  
  		Map<String, Object> serializedProperties = (Map)map.get(JsonSchema.KEY_PROPERTIES);
  		if (serializedProperties == null) {
  
  			serializedProperties = new TreeMap<>();
  			map.put(JsonSchema.KEY_PROPERTIES, serializedProperties);
  		}
  
  		// serialize remote properties
  		for (final StructrRelationshipTypeDefinition rel : root.getRelationships()) {
  
  			if (getId().equals(rel.getSourceType())) {
  
  				// outgoing
  				final Map<String, Object> property = rel.serializeRelationshipProperty(true);
  				if (property != null) {
  
  					serializedProperties.put(rel.getTargetPropertyName(), property);
  				}
  			}
  
  			if (getId().equals(rel.getTargetType())) {
  
  				// incoming
  				final Map<String, Object> property = rel.serializeRelationshipProperty(false);
  				if (property != null) {
  
  					serializedProperties.put(rel.getSourcePropertyName(), property);
  				}
  			}
  		}
  
  		// remove empty objects from json
  		if (serializedProperties.isEmpty()) {
  			map.remove(JsonSchema.KEY_PROPERTIES);
  		}
  
  		return map;
  	}
docs: ----- package methods -----