support for has-many and belongs-to