title: Room persistence library @Query not working
body: <blockquote>
    <p>I have also uploaded <a href="https://github.com/DasserBasyouni/BakingApp" rel="nofollow noreferrer">the whole project to GitHub</a>, the code and the main line of code the request the query is line 144 in <a href="https://github.com/DasserBasyouni/BakingApp/blob/master/app/src/main/java/com/example/dasser/bakingapp/ui/DetailFragment.java" rel="nofollow noreferrer">DetailFragment.java</a>.</p>
  </blockquote>
  
  <p>I am trying to query ingredients from the table with the id, the query is returning a null result. the same query is working well but without <code>LIKE (:id) LIMIT 1</code>, but giving all the rows.</p>
  
  <pre><code>@Query("SELECT ingredients FROM recipe_db WHERE id LIKE (:id) LIMIT 1")
  String getRecipeIngredients(List&lt;Integer&gt; id);
  </code></pre>
  
  <p>I have tried:</p>
  
  <ol>
  <li><code>=</code> instead of <code>LIKE</code></li>
  <li><code>:ids</code> without <code>()</code></li>
  <li>single <code>Integer/int</code> <code>id</code></li>
  <li>checked Database itself if the desired id doesn't exist.</li>
  </ol>
  
  <p>recipe_db code</p>
  
  <pre><code>@Entity(tableName = DATABASE_NAME)
  public class Recipe implements Parcelable {
  
  @ColumnInfo(name = "image_url")
  private String image;
  
  @ColumnInfo(name = "servings")
  private int servings;
  
  @ColumnInfo(name = "steps")
  private List&lt;Steps&gt; steps;
  
  @ColumnInfo(name = "ingredients")
  private List&lt;Ingredient&gt; ingredients;
  
  @NonNull
  @ColumnInfo(name = "name")
  private String name;
  
  @PrimaryKey
  @ColumnInfo(name = "id")
  private int id;
  
  public Recipe(@NonNull String image, int servings, List&lt;Steps&gt; steps
          , List&lt;Ingredient&gt; ingredients, @NonNull String name, int id) {
      this.image = image;
      this.servings = servings;
      this.steps = steps;
      this.ingredients = ingredients;
      this.name = name;
      this.id = id;
  }
  
  
  public String getImage() {
      return image;
  }
  
  public int getServings() {
      return servings;
  }
  
  public List&lt;Steps&gt; getSteps() {
      return steps;
  }
  
  public List&lt;Ingredient&gt; getIngredients() {
      return ingredients;
  }
  
  public String getName() {
      return name;
  }
  
  public int getId() {
      return id;
  }
  
  public static class Steps {
      @SerializedName("thumbnailURL")
      private String thumbnailurl;
      @SerializedName("videoURL")
      private String videourl;
      @SerializedName("shortDescription")
      private String shortdescription;
      private String description;
      private int id;
  
      public String getThumbnailurl() {
          return thumbnailurl;
      }
  
      public String getVideourl() {
          return videourl;
      }
  
      public String getDescription() {
          return description;
      }
  
      public String getShortdescription() {
          return shortdescription;
      }
  
      public int getId() {
          return id;
      }
  
      public void setThumbnailurl(String thumbnailurl) {
          this.thumbnailurl = thumbnailurl;
      }
  
      public void setVideourl(String videourl) {
          this.videourl = videourl;
      }
  
      public void setShortdescription(String shortdescription) {
          this.shortdescription = shortdescription;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  }
  
  public static class Ingredient {
      private String ingredient;
      private String measure;
  
      @Ignore
      private float quantity;
  
      private String str_quantity;
  
      public String getIngredient() {
          return ingredient;
      }
  
      public String getMeasure() {
          return measure;
      }
  
      public float getQuantity() {
          return quantity;
      }
  
      public void setIngredient(String ingredient) {
          this.ingredient = ingredient;
      }
  
      public void setMeasure(String measure) {
          this.measure = measure;
      }
  
      public void setQuantity(float quantity) {
          this.quantity = quantity;
      }
  
      public String getStr_quantity() {
          return String.valueOf(quantity);
      }
  
      public void setStr_quantity(String str_quantity) {
          this.str_quantity = str_quantity;
      }
  }
  
  
  @Override
  public int describeContents() {
      return 0;
  }
  
  @Override
  public void writeToParcel(Parcel dest, int flags) {
      dest.writeString(this.image);
      dest.writeInt(this.servings);
      dest.writeList(this.steps);
      dest.writeList(this.ingredients);
      dest.writeString(this.name);
      dest.writeInt(this.id);
  }
  
  protected Recipe(Parcel in) {
      this.image = in.readString();
      this.servings = in.readInt();
      this.steps = new ArrayList&lt;Steps&gt;();
      in.readList(this.steps, Steps.class.getClassLoader());
      this.ingredients = new ArrayList&lt;Ingredient&gt;();
      in.readList(this.ingredients, Ingredient.class.getClassLoader());
      this.name = in.readString();
      this.id = in.readInt();
  }
  
  public static final Parcelable.Creator&lt;Recipe&gt; CREATOR = new Parcelable.Creator&lt;Recipe&gt;() {
      @Override
      public Recipe createFromParcel(Parcel source) {
          return new Recipe(source);
      }
  
      @Override
      public Recipe[] newArray(int size) {
          return new Recipe[size];
      }
  };
  }
  </code></pre>