Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » many to many and field names
many to many and field names [message #521] Thu, 04 January 2007 11:10 Go to previous message
interop is currently offline  interop
Messages: 45
Registered: October 2006
Member
The convention here is that all primary keys are named 'id' (1 pk per table) and all foreign keys are named <tablename>_id.

Unless I'm missing something this convention looks to create a lot of extra work for me. In particular in the list2 transactions.

e.g. if I have the following tables: group, group_employee,
and employee where group_employee is the link table between group and employee. when I want to do a list2 employees of a particular group I have to modify the where clause in the _cm_pre_getData function and change 'id' to 'group_id'. Then it doesn't look like I can display groups of a particular employee because how do I know to change 'id' to 'employee_id' or 'group_id'?

So, My question: Is this convention going to cause me too many problems or did I miss something?
p.s. Changing the convention is not a problem- so if you recommend that let me know.
thanks
 
Read Message
Read Message
Previous Topic: displaying many to many relationships
Next Topic: List with pre-defined search active
Goto Forum:
  


Current Time: Sat Apr 27 01:35:51 EDT 2024

Total time taken to generate the page: 0.00950 seconds