February 2015
Intermediate to advanced
400 pages
8h 50m
English
As usual, we are going to start by creating the models. First, let's list the tables we will be working with and their columns:
Actor: actor_id, first_name, last_name, last_updateCategory: category_id, name, last_updateLanguage: language_id, name, last_updateCity: city_id, city, country_id, last_updateCountry: country_id, country, last_updateWe could create one Model for each of these entities with no problem at all; however, we want to reuse as much code as possible. Take another look at the list of tables and their columns. Notice that all tables have one column in common—the last_update column.
All the previous tables have the last_update column in common. That being said, we can create a super model that contains this field. ...
Read now
Unlock full access