Closed janko closed 5 years ago
I found the answer on the website:
Setting struct_namespace
on the repository indeed works as expected. It would be convenient if struct_namespace
setting from the relation would extend to the repository as well, but that's something that can be discussed outside of GitHub issues.
@janko I think you're right and repos should respect relation setting but only if it's set to something, otherwise repo setting should override whatever relation used.
Describe the bug
I'm using
struct_namespace
in a relation, which is applied when I use the relation directly, but isn't within a repository. I believe this is a bug, because the relation object within the repository shows the correctstruct_namespace
.To Reproduce
Expected behavior
I expected
UserRepo#by_id
to return anEntities::User
object, especially because theUserRepo#users
relation object seems to have the correctstruct_namespace
configured. I get anEntities::User
when I access the relation directly, but not through the repository.I would ideally like if
UserRepo#create
also respectedstruct_namespace
, though I get that commands might not even go through relation objects.Your environment