Typically we should be able to transfer the following metadata to the MongoDB driver
@Entity public class User { @ManyToMany @EmbeddedInDocument public Set<Address> addresses; }
The facility should be extensible to make sure a driver can add any necessary custom metadata. A programmatic mapping API would be useful too.