rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.08k stars 161 forks source link

Mapping nested entities #488

Closed joelvh closed 6 years ago

joelvh commented 6 years ago

Hi all,

Been reading up on ROM and my first project is a ROM adapter for the RailsEventStore project. I am still getting my head around the shift from ActiveRecord to this paradigm, but ROM is what I've been looking for. rom-rb.org has been super helpful!

As I learn about adjusting to different ways of querying data, I'm still looking for examples of simple shifts from AR to ROM. I'll save those for another time.

Question: How do I map nested entities to a specific model, for certain queries in my repository class?

Where can I find more examples of mapping and moving from AR to ROM? I've used rom-rb.org, but the mappers section is sparse, unless I missed where to see more examples.

Thanks!

flash-gordon commented 6 years ago

Hi, please forward your questions to https://discourse.rom-rb.org/ as mentioned in our contribution guidelines, we'll sort it out there. Thanks!

joelvh commented 6 years ago

Sorry I missed that guideline. Posted here: https://discourse.rom-rb.org/t/mapping-nested-entities/223