View Full Version : [INFOREQ] Multi Level associations doesn't work.

12 May 2012, 8:05 AM
Ext version tested:

Ext 2.0.1
Browser versions tested against:

Safari 5.1.5
Safari Mobile
DOCTYPE tested against:


Nested Dynamic associations don't appear to be working. That is to say I have a model of "Case" a case has_many "Hospitals, Doctors, & Toolsets" using the Associations attribute on the model to populate these nested associations works fine.
BUT a When I load a Toolset we are also send its upcoming Cases using the same associations setup. The cases are loaded but each cases subsequent "Hospitals, Doctors, & Toolsets" are not. So it seems the associations only work one level deep.
Steps to reproduce the problem:

Create a Cases models with relationship
A Case has_many model hospital, doctor & toolset
Hospitals, Doctors and Toolsets each has_many Cases
setup all relationships to load dynamically via the association config on the model.
Load the a Case and see that it's three associated models loaded dynamically with the record. The model is loaded and has small store holding one record for model Hospital, Doctor, and Toolset
Load A Hospital and see that its associated Case loads fine, however the Cases nested Hospitals, Doctors, and Toolsets are not loaded.
The result that was expected:

A Hospital should load its Case relationship and theCase item should include its 3 relationship records (Hospital, Doctor, and Toolset)
looks something like this:
Hospital record
- Case relationship record
- Hospital Relationship record
- Doctor Relationship record
- Toolset Relationship record
The result that occurs instead:

Hospital loads its Case relationship record but the Case record that is nested in the Hospital doesn't include its relationship records.
what I get:
Hospital record
- Case relationship record
- Empty Relationship Stores
Test Case
This is a highly complex setup using a rails app for the database. Its based around models that have a has_many_through setup in rails. I'm aware this level of complexity may not be supported.

Providing a test case is difficult I have an WIP app for a client I can get a sencha team member access to if it would be helpful. for now here is a print out of what I get in console for the scenario.

BUt I think as someone reads this they will know immediately if this level of nested associations is something that is intended to work or not.

Operating System:

Mac OS X 1.7.3

14 May 2012, 5:30 AM
Can I get a working test case?

19 May 2012, 12:14 PM
I'm going away on vacation. I hope to get you the information needed when I return.