I have looked at your schema and I find a couple of problems.
All the Sequence nodes are set to minOcurs=1 and maxOcurs=1. While this will might work for PatientDetail if they only had one illness I don’t think it is proper for Patients since I assume there are more than one Patient in the database.
The next issue is that you are using /Patient/Patient_No for the accessPredicate in the PatientsDetail table. Assuming there are more than one patient which Patient_No node should be selected? What is more descriptive and accurate (but I’m not sure it will work) is to use something like …/Patient_No as this will describe the parent node to the PatientsDetail node that is being processed and exclude all others.
I’m not even sure if you can nest subTreeSQL mapping types like you are doing here. It seem to me that there is something missing in how this all works besides the ability to do a basic join in any SQL query.
#webMethods#Tamino#API-Management