Relating models using association

In an application, we generally deal with multiple types of models, for example, user, address, order, payment, account, and so on. Some models are self-sufficient. However, there will be some models that are related to each other, and there is an association which exists between them. For example, a user can have one or more addresses, a user may place one or more orders, and an order may have one or more payments made against it, and so on. In a typical relational database, we have entities and the relationship between them. The same can be achieved with models using the association mechanism provided by Sencha Touch. This recipe will demonstrate how to define associations between models, which are used by the ...

Get Sencha Touch Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.