How do i create a custom adapter method?

21 views Asked by At

What I want is to make a specific request to my backend and get back a list of models but it is not exactly a findAll/query call as I require an id (the url would be in the format v1/personType/{id}) so I believe I need a separate adapter method.

So my question is: how would I make an adapter method such that the results are converted from plain json to models.

It seems strange to me that only findAll/query and a couple of other built in methods are the only ways that I can get ember to turn the results into models.

I’ve tried making my own fetch request in an adapter method and then normalizing but normalizing didn’t do what i thought it would and its not being turned into models.

Any help is appreciated.

0

There are 0 answers