I have a situation where we need to have 2 tables with on-to-many relationship point to each other in the tab that next to 'edit'. However, it doesn't work quite well. The following is the example (assuming a_id appears in both tables, and is primary key in table_A and foreign key in table_B):
records in table A can have many records in table B. In table A's relationships.ini, I defined the __sql__ as follow:
- Code: Select all
__sql__ = "select * from table_A where a_id = '$a_id' "
clicking the other_references tab will show all other_references for a specific change_memo. However, when I defined the __sql__ in tabe B's relationships.ini, clicking the change_memos tab shows nothing:
- Code: Select all
__sql__ = "select * from table_A where a_id = '$a_id' "
Does somebody know what is wrong with it?