iknow / iknow_view_models

Bi-directional serializable JSON views
MIT License
2 stars 0 forks source link

Make sure associations have inverses. #44

Open chrisandreae opened 7 years ago

chrisandreae commented 7 years ago

If an association doesn't have an inverse set correctly, cache clearing might not work on free. Make sure that all owned associations have an inverse (or, if polymorphic, have an inverse for each of the viewmodel types)

thefloweringash commented 7 years ago

Also, if an association has an inverse specified that doesn't actually exist, the error message is buried fairly deep inside UpdateOperation. IIRC, you getParentData with association_reflection set to nil.