I am using Doctrine 2 for my ORM as well as for my application I've Customers, who may have a many to a lot of relationship with Companies, but a person are only able to have one active/current company. My real question is where you can range from the area marking anyone's current firm. My ideas are that you will find two options: 1) Adding an isCurrent area towards the UsersCompanies reference table. However, if I wish to obtain a user's current company, I would need to cycle with the a user's UsersCompanies references and appearance the is_current area for every reference. 2) Placing a current_customers_companies_id within the user's table, to ensure that it may be easily utilized.
Of course, I thank you for some time and input.
Well, because the user might have just one current company, it might lead me to consider it is a specific one-to-many relationship. Thus the very best (and also the easiest :) ) method of doing it might be to simply possess the current_company_id property inside your user object.