When dealing with database(s) is it common to have a repository for each DAO or would one implement a repo that handles all DAOs?
All examples on the entire internet is dealing with 1 DAO….
04/24/2018, 7:45 AM
I think it makes sense that one DAO could use many tables, and that one repository could use many DAOs. But having one repository for all DAOs is going too far IMO
04/24/2018, 7:46 AM
Thanks @arekolek. That makes sense. It would grow pretty big in the life time of the app, I guess
04/24/2018, 2:19 PM
I've always thought of repos as a way to group DAO's, so your DAO should basically work on a single table, and then you can use a Repo to logically group DAO's together for queries that may require more than 1
So my repo's are usually
, for doing specific multi query/transaction type stuff, and DAO's are usually