Importing MSSQL Data Related With Foreign Keys

0
Hi, I am trying to import my old MSSQL data to Mendix database. I have successfully installed both Database Replication and MX Model Reflection add-ons, and added the overview pages to menu., I synced the database and can successfully import standalone tables to mendix. But I could not be successful in importing related (associated) tables. Tables in MS SQL have the following tables with the following fields: Student Table: StudentID, Student Name, Birth Day, ParentID Parent Table: ParentID, Parent Name I have created the same entities in Mendix with Primary Key attributes and create the appropriate association. For Student Entity, I have mapped all the fields (including the StudentID field as a key) with the matching attributes in mendix and also add an association mapping for ParentID to Parent entity as a key only for the associated object and with association: MyFirstModule.Student_Parent/MyFirstModule.Parent/ParentID For Parent Entity, I have mapped all the fields (including the ParentID field as a key) with the matching attributes in mendix. I have imported both mappings without an error. But the association are not built in mendix. What am I doing wrong? How can I import related MSSQL tables as associated tables in Mendix with step by step? Thanks in advance. Regards, Armagan
asked
1 answers
1

Having imported the data into both tables, I would then create a simple microflow to take a list of Student records, loop through them and for each one, do a retrieve for the Parent record with the matching ParentID, and set the association between the 2 records in a change object action.

Then, on your overview page of students, add an action button which passes all the student records and runs this microflow.

 

Added: Change object action looks like this:

 

answered