Replies: 2 comments
-
Is the answer just to split the constraint into "not enough"and "zero" variants? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @mwotton! Before the existence of
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I find myself needing to test that all Foos have at least n associated Bars. In SQL I'd do a left join followed by a group with a count projection, but I'm not sure what the right way to do this in timefold is (as the obvious join and group fails in the case that a Foo has zero Bars). I can sort of see how to cobble it together with one stream that collects it into a list, and concat-ing it together with another stream that simply provides all Foos with an empty list of Bars, then grouping on Foo.id, but it seems a bit inelegant: is there a better construction?
Beta Was this translation helpful? Give feedback.
All reactions