Finds JoinColumns in an array of tables, and adds 'type' fields by looking up the columns
Parameters:
tables
&$tables
This should be an associative array containing 'tablename' => tabledefinition tabledefinition is itself an associativive array of 'COLUMN_NAME_CONSTANT' => columndefintion COLUMN_NAME_CONSTANT should be a unique constant within the table, and column definition should be a Column object or JoinColumn object