This does not work. I am using ember data 1.0.0-beta.5. Getting an error of no model manager was found. All the stackoverflow answers and guides are outdated. Could someone guide me on this one? And also add on how to go about polymorphic associations? At least a pointer would be really helpful.
have you tried setting the inverse on manager? Generally speaking you need the inverse to be explicitly declared on both ends of the relationship. Since there is only one belongsTo and only one hasMany, you may also not need to declare the inverse at all, or it may work only declaring it on manager instead of on assistants. (this sort of super self-referential model is not one Iāve attempted so I would be curious to know what other bugs / solutions you encounter.)
Your extend solution is probably the right one, definitely so if managers are never assistants.
Are you absolutely sure that the āno manager model was foundā error was raised by the presence of the āinverseā definition? Because inverse should not be looking up a manager model, period, it should be looking up āApp.Employee.managerā. Here is a working JSbin: http://jsbin.com/OnisiwAP/18#/employees