I have three tables in my database. They are Student, Subject and Mark. Student has these fields: id, name, address. Subject has these fields: id, name. And Mark has these fields id, studentId, subjectId and mark. So, here I have these associations like Student can have many subject and one subject has one mark. So, how can I define these relations in MVC pattern like placing them in Model and Store. I want to display the information like student_name, student_address, subject_name and marks in my grid panel. But I having trouble associating them in Model and Stores.
Asked
Active
Viewed 77 times
0

Guilherme Lopes
- 4,688
- 1
- 19
- 42

user3127109
- 3,421
- 8
- 24
- 33
-
Their are lots of examples out there. What did you come up with yourself? – Tarabass Aug 05 '15 at 10:46
-
I got no clue so I just went on defining separate model and store for my required data and passing those data from the backend – user3127109 Aug 05 '15 at 16:17
2 Answers
0
Take a look at the docs of the model and the reader. There you will find enough information to get you started.
After reading the docs you can take a look at the tutorials of MiamiCoder, ModusCreate and this one..

Tarabass
- 3,132
- 2
- 17
- 35
0
I just made sometime ago a fiddle that show how association works. You can see json example also.
When you catch the basics, rest should be easier to understand.

Paweł Głowacz
- 2,926
- 3
- 18
- 25