make relation definition more flexible by exposing type indexes

add ManyToMany relation type