* @param formatVersion the format version
* @param <T> the type
* @throws IOException if there is an io problem
*/
public <T> void serializeWithRelationship( @Nonnull T object, @Nonnull Class<T> type, @Nonnull Node node, @Nonnull RelationshipType relationshipType, @Nonnull Version formatVersion ) throws IOException {
Node targetNode = node.getGraphDatabase().createNode();
node.createRelationshipTo( targetNode, relationshipType );
serialize( object, type, targetNode, formatVersion );
}