Combine cross-gateway relations

Hi all!
Has anyone done cross-gateway custom mappers? I tried to do it but failed. I prepared some examples which illustrate these problems: https://github.com/v-kolesnikov/rom-bugs/pull/1/files, https://github.com/v-kolesnikov/rom-bugs/pull/2/files
I need to combine some relations from different gateways and adapters. I have a really bad data-storage design, I know, but it is reality unfortunately.

huh nice use case you’ve got there :smiley: I’ll dig into it once I’ve got some time and get back to you.

Thank you Piotr! I’ll strive to have in done too. I think - combine_with is not what we need when we are dealing with cases such this. Improving an associations DSL for adapters seems like a better idea. (I could be wrong).

Oh yeah, we definitely need to add association support to rom-mongo adapter, because as long as you can simply return tuples with combine keys included, auto-mapping will just work, and you’ll get back nested data structures. For the time being though, I think you should be able to achieve what you need in a slighly simpler way.