Sex in dreams is a common symbol. To put your mind at ease, please check out this link to its definition:
having sex:
dreamdoctor.com/dream-dictionary/definitions/having-sex.html
cheated on:
dreamdoctor.com/dream-dictionary/definitions/cheated-on.html
It's possible that your friend Jake is symbolic of someone else with whom you feel your boyfriend is "cheating." While dreams can reveal intuition about things going on around you that are subtle or you'd rather not acknowledge, odds are your dream is reflecting your sense that someone "inappropriate" has stolen your boyfriend's attention... thus it feels as if he is cheating on you.
The best way to make sure dreams like this don't occur again is to confront them. Assuming you feel safe and comfortable enough to do so, talk to your boyfriend openly about your feelings. If you feel as if you're not getting the attention you deserve or that someone is getting more attention from your boyfriend than you, let him know that. Odds are that he's is unaware. Once you figure out the situation in your life (and who) caused you to have those feeling that triggered the dream, you may decide that you were being overly sensitive. The great thing about dreams is that they will always let you know how you are feeling about what's most important to you in your waking life.
Hope that helps. Good luck and sleep well.