I'm working on a program that receives tweets from the twitterstream, and stores them in the DB.
There is a Keyword Model, and a Tweet Model
The keyword model has a manytomany of tweets, ex.
@ManyToMany
List<Tweets> tweets;
I want to search tweets, and return only the ones that are assigned to that keyword. In vanilla SQL similar to:
SELECT * FROM tweet t, keyword k, keyword_tweet kt where t.id=kt.tweet_id and k.id=kt.keyword_id
Any idea how to do this in Play! using ebean?
Each Tweet has an ID, each keyword has an ID, Play automatically created another table "keyword_tweet" for the @ManyToMany association.