AnsweredAssumed Answered

SimpleJoinQuery examples

Question asked by cf26721 on Nov 4, 2016

TGIF, everyone


As my custom building blocks are becoming more complex, I'm struggling a little bit to find any examples of Bb's DAO implementations, beyond the SimpleSelectQuery.  In a project I'm working on, I have a few custom tables, and need to join them.  In poking through the DAO classes, I found a SimpleJoinQuery class, but I'm struggling to figure out exactly how to implement it. 


Let's say I have custom_table_a, which corresponds to and  And I have custom_table_b, which corresponds to and  There is a relationship between custom_table_a.b_pk1 and custom_table_b.pk1.  Is there an efficient way to do this using Learn's DAO classes, or should I resort to manually doing a join query to handle this?  I'd like to avoid putting any actual queries in my code, if I can avoid it.  And I'd like to avoid doing two separate processes / database calls as well, just to keep things as efficient/tidy/performant as I can.


I appreciate any suggestions y'all may have.