Hi guys,

Is there any way to serve database collections with relations via json?

My function looks like the following :


findings('GET', []) ->

    Periods=boss_db:find(period,[{deleted,'equals', 0}], 
[{},{},{order_by,'created_at'}, descending]),

    Areas=boss_db:find(area,[{deleted,'equals', 0}], 
[{},{},{order_by,'created_at'}, descending]),

{json, [{areas, Areas},{periods, Periods}]}.


This works fine, however Area model "has many" "Media" records which are not 
inside the JSON output.

I need the relational data inside JSON output.

Cheers,

Ibrahim.

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/C6D176E4-38D5-4026-A8AF-DC5B093B375F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to