I have 3 tables with one to many relationships as follows:
Customers -> Cars -> Jobs
There can be many customers. Each customer can have many cars. Each car can have many jobs (this is for a Garage to keep track of work done on cars).
Each job can only have one parent car record. Each car can only have one parent customer record.
Sounds simple.
So far, I have got Chronoconnectivity working to show a list of customers, enable editing/adding of the customers (by linking to a Chronoforms v5 form), and to delete customers.
Next step is to select one customer and add their cars (using another form) and then for each car, add job(s) again using a form.
I chose Chronoconnectivity because of the filter and search facilities and the ability to paginate when there are many customer records to deal with.
So my question is...
Do I use one Chronoconnectivity connection with 3 models, or... do I create 3 separate connections? Or do I just use Chronoconnectivity to list and select the customers, then drop into Chronoforms to manage their cars and jobs?
I can't find an example of how to drill down like this using Chronoconnectivity.
The cars table has a customer_id field which will match the customer.id field.
The jobs table has a car_id field which matches cars.id field.
Any guidance on the correct way to implement this will be gratefully received.
Thanks
Brian
Customers -> Cars -> Jobs
There can be many customers. Each customer can have many cars. Each car can have many jobs (this is for a Garage to keep track of work done on cars).
Each job can only have one parent car record. Each car can only have one parent customer record.
Sounds simple.
So far, I have got Chronoconnectivity working to show a list of customers, enable editing/adding of the customers (by linking to a Chronoforms v5 form), and to delete customers.
Next step is to select one customer and add their cars (using another form) and then for each car, add job(s) again using a form.
I chose Chronoconnectivity because of the filter and search facilities and the ability to paginate when there are many customer records to deal with.
So my question is...
Do I use one Chronoconnectivity connection with 3 models, or... do I create 3 separate connections? Or do I just use Chronoconnectivity to list and select the customers, then drop into Chronoforms to manage their cars and jobs?
I can't find an example of how to drill down like this using Chronoconnectivity.
The cars table has a customer_id field which will match the customer.id field.
The jobs table has a car_id field which matches cars.id field.
Any guidance on the correct way to implement this will be gratefully received.
Thanks
Brian
Hi Brian,
3 connections is the easiest approach, and you can link between them and the forms, but the main disadvantage is that you will have each function separated.
The other route and the better on the long run is to use Connectivity v6, one connection can handle everything including the forms, but its very new and not enough documentation is available, I'm trying to write more though and you can post questions here, here is the first tutorial:
http://www.chronoengine.com/faqs/73-chronoconnectivity-v6.html
You will need php 5.6 (maybe works on 5.5).
Best regards,
Max
3 connections is the easiest approach, and you can link between them and the forms, but the main disadvantage is that you will have each function separated.
The other route and the better on the long run is to use Connectivity v6, one connection can handle everything including the forms, but its very new and not enough documentation is available, I'm trying to write more though and you can post questions here, here is the first tutorial:
http://www.chronoengine.com/faqs/73-chronoconnectivity-v6.html
You will need php 5.6 (maybe works on 5.5).
Best regards,
Max
Thank you Max. I'm trying CCV6 and have got a table listing the customers. How do I create an Add button (to add a new customer)? In CCV5 there was _TOOLBAR_NEW_
Also, how do I add a Selector column so I can use it with a Delete button (and how do I add the Delete button like _TOOLBAR_DELETE_ )?
Thanks :-)
Brian
Also, how do I add a Selector column so I can use it with a Delete button (and how do I add the Delete button like _TOOLBAR_DELETE_ )?
Thanks :-)
Brian
Hi Brian,
In v6 you need to add a "toolbar button" view element, and set the "event" to "new" (or "edit"), and create a "fields" view, and then call it inside a "form" view, which should be called inside the "edit" event.
Its better if you test a demo app, this has been added to the next update, which is not yet released, but you can send me a message using the "contact us" page and I can send you the installer.
Best regards,
Max
In v6 you need to add a "toolbar button" view element, and set the "event" to "new" (or "edit"), and create a "fields" view, and then call it inside a "form" view, which should be called inside the "edit" event.
Its better if you test a demo app, this has been added to the next update, which is not yet released, but you can send me a message using the "contact us" page and I can send you the installer.
Best regards,
Max
This topic is locked and no more replies can be posted.