Good day!

I have some queries in my code, i.e. 
*Comment.dataset.group_and_count(:creator_id).all* or some *join*s. These 
queries return *Comment* but nor dataset nor hash.

But I don't want to initialize a model at all. Because of hooks, plugins, 
etc. start to work. So, I do *DB[query_above.sql].all* and it returns a 
dataset.

So I have two questions:

1) Is there some standard method to avoid initializing a model during query?

2) Is this behavior correct? Well for *join* it is correct because of SQL 
query has *SELECT `comments`.**, but for *group_and_count*?
What's the logic (to understand)? *Comment*'s methods always return 
*Comment*?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to