java - Searching Ebean @ManyToMany -


I am working on a program that receives Tweets from twitterstream, and stores them in db.

is a keyword model and a Chilean model

The keyword model has several tweets, e.g.

  @ManyToMany list & lt; Tweets & gt; Tweets;  

I want to search for tweets, and only return the keyword that has been assigned to the keyword. Similar to Vanilla SQL: Tweet with

 , keyword K, keyword_ttt kt, where t.id = kt.tweet_id and k.id = kt.keyword_id  

How to do any idea in this play! Using EBI?

Each tweet has an ID, each keyword has an ID, automatically run another table "keyword_tweet" for @ManyToMany Association.

you can do something like this:

  public list & lt ; Tweets & gt; SearchTitts (Tweets t) {Return Tweets.find.where () .eq ("tweets.id", t.id) .findList (); }  

as mentioned


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -