Describe the bug
I need to compare two fields with model.field1 > model.field2 but Beanio generated the wrong filter.
My model is like:
class H(Document):
last_sms_time: datetime
next_sms_time: datetime
And H.find(H.next_sms_time < H.last_sms_time).get_filter_query() returned {'next_sms_time': {'$lt': 'last_sms_time'}} that compares next_sms_time with literal string 'last_sms_time'.
But the correct filter that will be recognized by Mongodb should be:
Describe the bug I need to compare two fields with
model.field1 > model.field2
but Beanio generated the wrong filter.My model is like:
And
H.find(H.next_sms_time < H.last_sms_time).get_filter_query()
returned{'next_sms_time': {'$lt': 'last_sms_time'}}
that comparesnext_sms_time
with literal string 'last_sms_time'.But the correct filter that will be recognized by Mongodb should be:
or with
$where
:To Reproduce Sorry I will complete the sample later.
Expected behavior See above.
Additional context Nothing.