Currently my app creates tables for each customer in which they can store their own contacts.
This is created on the fly for each customer as they are created themselves.
eg: Customer 1 get a new table created called contacts_1
I have an ORM model called Contact, which i have adapted slightly to allow either one or two variables to be passed to when using the factory.
eg: Load the Contact object as an iterator for that list $contact = ORM::factory('Contact',1);
eg: Load the Contact object for a specific contact $contact = ORM::factory('Contact',array(1,1)); (First variable is the list id, second the contact id)
This all works fine, however when trying to save a contact's info when loaded via the iterator, it's not passing the list_id variable through, so cannot perform the create / update correctly.
It works fine when loading a single contact however.
I'm looking for suggestions / advice on how to either: * Do this better, short of creating individual ORM models for each of the contact lists created on the fly * How to pass the list_id variable through to the iteration section of the ORM model, so the save function performs correctly.