searching related records

I have two tables: locality and synonym. Each locality, identified by loc_id, has a name. Some of the localities have a number of synonyms in the synonym table, using loc_id as a foreign key, but many of the localities do not have any related records in the synonym table.

When searching for a locality name, I need to search both the locality table and related records in the synonym table.

Using the menus, the process is:

  • find
  • enter ‘Test’ in field locality_name
  • new record
  • enter ‘Test’ in field synonym (on related table)
  • search

In 2.2 beta 2 this search included all records in the locality table, and also all related records in the sysnonym table. However in beta 3 and 4 it only includes those records in the locality table which have related records in the synonym table, and the related records.

Has something been changed or is this a bug?

this can’t be changed because it always worked this way
If you are searching over related records (so a join) then that join must also be valid..

If you want something else then you must ust outer joins and do the query youre self (loadRecords with sql)

Thanks for the explanation. Strangely, it did seem to work this way before - maybe that was the bug! Anyway, now I know not to expect it to work that way, and have written the search using SQL. Thanks again.