Closed joevandyk closed 5 years ago
I will note that documentation improvement is definatly needed. This gem is still in an early, rough state.
I saw that section, but I'm still confused.
Which part is confusing? Assuming you've got a repo configured to use :users
relation, you simply do users.by_id(1).as(YourUserClass)
.
Ah, perfect. Thanks.
Not sure if I'm blind, but can't see where as
is mentioned in that page.
It is mentioned :) Anyhow, a more comprehensive guide will be written as soon as I'm done with new rom-sql and rom-repository versions.
Closing as this is outdated. User docs are still pending, even after 3 years. Oh well. There's an issue about it in rom-rb/rom-rb.org#279
In the example in the README right now, calling
container.relation(:users).by_id(1)
returns a hash. It would be nice to see how to get some sort of domain object back.