Hi all,

I have two Django models; MonitoringPeriod and AssignmentPeriod. Both models 
have start_date and end_date fields. A MonitoringPeriod can be covered by one 
or more AssignmentPeriod instances, which may or may not cover the entire range 
defined by the start and end of the MonitoringPeriod, and may or may not 
overlap. A MonitoringPeriod would be classed as "fully covered" if all distinct 
dates between its start_date and end_date are included in the set of dates 
specified by its related AssignmentPeriods.This is somewhat trivial to define 
in raw SQL but I'd prefer to do it in the ORM query setting - any ideas?

More details and class definitions, as well as raw SQL are available here:
 
https://stackoverflow.com/questions/59478515/aggregating-of-distinct-dates-across-onetomany-relationships-using-djangos-or

Many thanks in advance for any guidance!

S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/l5HbPZmIugAMG3QraBmb9PHksYYZSlLDinyBzm0MBXVrIpYUUSNdaYijrbSICV6v-_pT4vhO73hEXF_SBrad48x3BfItZZ0z2BFqLeL6Xow%3D%40pm.me.

Reply via email to