Open cflipse opened 4 years ago
@cflipse Adding struct_namespace Entities
to the ArticleRepository
solved the issue for me:
class Articles < ROM::Repository[:articles]
struct_namespace Entities
def list
articles.combine(:author)
end
end
When using auto_struct and a module definition, ROM is not respecting the configured types for an association.
reproduction script: https://gist.github.com/cflipse/947447e4c656b35d351ffb518df38d65
Directly mapping to the class via
map_to
will coerce the author field correctly.