First, let's start with the basics. Whenever we need to implement a complex screen, we need to start with the simplest component we can develop. After we have it working 100 percent, we can increment it and add more complex capabilities. So first, we need to create a model and a store to represent the Film
table. And after we have this part of the code working, we can work with the Category, Language, and Actor relationships.
First, we are going to create the model to represent the Film
table. Let's not worry about the relationships this table has for now.
We need to create a new class named Packt.model.film.Film
:
Ext.define('Packt.model.film.Film', { extend: 'Packt.model.sakila.Sakila', idProperty: 'film_id', fields: [ { name: 'film_id' }, { name: 'title', type: 'string' }, { name: 'description', type: 'string'}, { name: 'release_year', type: 'int'}, { name: 'language_id'}, { name: 'original_language_id...