Working with two database tables in ZF2.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Working with two database tables in ZF2.0

Mike A
This post has NOT been accepted by the mailing list yet.
The zf2tutorial example provides an 'albums' table. I add, say 'outlets' as another table to the database. How to use it in context with the tutorial example?

It seems I need to amend the module.config.php file, perhaps add another model, and if so add the model as Vehicle\Model\Outlets to the Use header of VehicleController.php. I keep getting "Call to a member function [method] on a non-object..." in the controller.

Tried available documentation without success, probably because models are unique to particular projects. Would be nice to know how to wire them in.

Could someone walk me through please.


*Would supply code if I fully knew ZF2.0 but I don't ATM.