Hello,
Let say we have an entity 'Employer'. Then an entity 'Employee'. Both are in a many-to-many relation over a table called 'Employment' (with additional fields and definitions which are unimportant for the case):
(defentity employer
(many-to-many employee :employment)
)
(defentity employe
(many-to-many employer :employment)
)
Now - the 'employment' relation has a validity period - the table's fields look more or less like that:
employee_fk int,
employer_fk int,
date_from date,
date_to date.
How can I use the date_from/date_to fields in Korma (any DML statements), for example to select the relation per specific date? Should I define an additional entity and how would look it's definition and how would change the definitions of 'employer' and 'employee'? Or is this unsupported? If yes - is there is a workaround which is better than going back to for a whole application back to clojure.tools.jdbc? (The question arises not only because of dates, but of all possible attributes attached to many-to-many relations which are often found in real db models).
Thank you in advance for any help!