I’am working on a new project and this question comes another time.
Where should i put sql queries that concerns many active records may be more than 3?
Should i put them in one of the activerecords?
Should i create a class for each type of query (for example one query class for all complex products queries another for customers accounts…). By complex i meant a query that joins many tables!
if it is 2 the best, where should i put those classes? My project is divided into modules and some queries can be used in different modules.
Hope it is too much clear and comprehensible if not please let me know.
Thanks in advance!