I have the User and Account ActiveModels current in app/models which have relations to each other.
I also have User and Account classes in app/versions/v1 for REST access, each of which extend the app/models items. I do this so I can extends their functionality for REST data access.
In each of the REST models I have fields and extraFields so I can restrict the data externally (hide password hash for example). This work when accessing the REST objects directly. As soon as I expand the relations, the expanded items display all fields and ignore the fields definition.
In both UserController and AccountController REST controllers, they reference the REST models and the UrlRule points to the appropriate routes.
What might I being doing wrong? I suspect that this is because the relation in the parent class is referencing the base objects but how might I make this work.
Do I need to re-define the relation in the REST models?