Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 1010

PI / HCI useOneAsMany mapping question

$
0
0

Hello everyone,

 

 

let's say we have following node structure :

 

 

/compoundemployee/person/employment_information -> 0:1 records

    custom_string1

    end_date

    start_date

    user_id

    ...

 

/compoundemployee/person/personal_information -> 0:n records

      end_date

      start_date

      ....

 

Question:

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 :

  • the used xsd file
  • xml file with sample data
  • person_id's with no or multiple personal_information records are 20, 2090, 2112, 2173, 2490, 2510, 2671, 2714, 2791, 2810

    personal_information.jpg

 

Any clue?

 

Thanks again, appreciated -


Viewing all articles
Browse latest Browse all 1010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>