Complicated joins with DBIx::Class
DBIx::Class is a great way to hide database interactions in your Perl classes. However, something that you might find easy in normal DBI queries can seem hard in DBIx::Class, because you lack direct access to the SQL. Take for example the following query:
join slots on (eventtyperooms.room_id=slots.room_id) join dayparts on (slots.daypart_id = dayparts.id) where slots.is_reserved=0 and eventtyperooms.eventtype_id='E375219C-CDBB-11E5-8739-AFC5…