Subject Re: [IBO] SchemaForeignKeyInfo
Author sllimr7139
> Possibly not, because the SQL could have been modified.
> Obviously this code is non-sense at least in the sense that some
> changes that were necessary removed the distinction between the two
> cases.
> I'll review this more closely to be sure it isn't a problem.
> What led you to make this discovery?
> Jason Wharton

Hi Jason,

Sorry for being so late to respond, I've had a very busy week. My
wife delivered our second daughter. I haven't really been paying
attention to work related stuff. Go figure huh?

I'm currently working on (upgrading/updating) the Open Query Builder
component and I've added the ability for the QB to automatically find
and link Foreign keys to Primary keys. In the original files I found
reference to SchemaPrimaryKeyInfo and after some searching I came
across the SchemaForeignKeyInfo routine. So I figured I'd try it and
see what I got.

It just didn't make sense. So I looked a little closer at the code
and started seeing some things that just didn't make sense to me.
Like why I couldn't get the table names of the primary key link. I
knew what table I was looking up, so why tell me that the foreign keys
were from it and not the table with the PK.

The other thing I noticed, like I said earlier, was that I was getting
the exact same results even when passing in different params.

I've gone back in my code history and looked to see if I could find
out when the code changed and AFAIK this code has been this way since
at least v4.5x.