Open co3moz opened 8 years ago
I'm starting to think autoFetch
isn't such a great idea. Something like explicit .eager
is a lot safer.
@dxg autoFetch in hasOne 's behavior is extremely bad, it consume much memory and even more slows down a lot. I am highly doubt if this orm has any optimization, because when I use raw sql it only takes 200ms work but using orm it usually takes 2000ms, the main reason is how autoFetch work. I think this orm is overrated by so many stars. And I am regret using it as my data layer for my production.
Hello guys,
Is it possible that hasOne's autoFetch should work only "reverse" calls?
I'm fetching user and i get all messages but i have some more relations with user so when i fetch user they came too. They have also other relations so it comes with big tree... Anyways to get big tree i'm changing
autoFetchLimit
but this timeuser-> message-> user -> message..
comes too.I clone the main object and delete repeated objects.. It's very lame solution. Can we find simplier solution to this problem? Maybe there should be
autoFetchOnlyOneToMany
option? With this we just don't fetchmessage->user
.