You beat me to it by mere seconds .... for this particular case the posts table holds a denormalized field: favoritecount which will spare you all those joins but for other badges to get them linked to a post your approach is the way to go.
– reneJul 19 '16 at 6:31