Fix for issue #36

This fix adds ability to deal with relations defined in metadata of ActiveRecord