Much of my sql code is generated (from POD). Now i have issue where table user_data has a FK to ref_status which points back to two different user_data. My code does the following
- begins a transaction
- looks at user_data (and adds it to a list)
- sees ref_status then repeats #2 with it
- executes the create table ref_status code
Then i get the exception
Foreign key 'FK__...__0F975522' references invalid table 'user_data'.
How do i create the two tables if they use both of eachother as a reference? i thought since it was in the same transaction it would work. I'll also note this code works fine in sqlite with enabling FK support (supported since last month release of System.Data.SQLite). So how am i expected to create these two tables?