Here I was using TableAlias property to reference my table by an alias. This helps with proper SQL generation to avoid table collisions when another search criteria is used that involves the same tables.

You can also remove the second JoinLink and use a pkid representing your cross reference system (from specLegacyProfile table) and use trdxrefSpecJoin.fkLegacyProfileID = 'pkid from specLegacyProfile table' as your conditional expression. This will help to speed up the search.

Another way to solve this problem is by using a view. You can create a view in your database that will contain the aforementioned condition and use the view in your join link.