Zend Framework 2 model foreign keys
问题 I am now approaching Zend Framework 2 and I followed the tutorial on creating a simple CRUD application. Everything is fine but now I want to, for instance, add a genre to the album. I added a category table to the database and created a foreign key category_id in the album table which refers to the category.id in the category table. How do I reflect this situation on my model using TableGateway ? 回答1: I hope this will help you and you will get the idea how to accomplish your task: <?php In