let's say we have following node structure :
/compoundemployee/person/employment_information -> 0:1 records
/compoundemployee/person/personal_information -> 0:n records
For selection of personal_information, personal_information/start_date needs to be >= employment_information/start_date <= personal_information/end_date.
I tried the mapping below, but for attached test data I get for person_id 2714 the personal_information from 2810. For 2810 I get the personal_information from 2830. There seems to be some context issue, but can't exactly point out why.
The personal_information/end_date value can be null, so I have added 'mapWithDefault'. To keep the queue consistent, I have added 'mapWithDefault' to personal_information in 'useOneAsMany', as i.e person_id 20 has no personal_information.
The context of employment_information/start_date below is changed to /person, this is a 0:1.
Test data attached :
Thanks again, appreciated -