You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but get an array of Hanami::Entities without "months", because it is not defined at entity-schema.
I think this worked in previous hanami-versions, but I'm not sure.
Just for info: To workaround the issue, I ended with a hack like this.
It's one of those cases where the POLS bites back at you. We make sure that everything that a repository returns is turned into an Entity. But entities have schemas and aren't really all that a repository can return.
What I can offer you, so you can get rid of the fetch call, is calling #map over the relation you get on your example.
@wuarmin it's a good idea - specially in case somebody needs only skinny API. I tried to find it somewhere in the docs, but without success, so a guide extension is a great idea.
cllns
changed the title
Hot to get a raw result(no Hanami::Entity) from a query.
How to get a raw result(no Hanami::Entity) from a query.
May 14, 2018
Hello,
I have following query:
and expect a unmapped result like
but get an array of Hanami::Entities without "months", because it is not defined at entity-schema.
I think this worked in previous hanami-versions, but I'm not sure.
Just for info: To workaround the issue, I ended with a hack like this.
best regards
The text was updated successfully, but these errors were encountered: