Skip to content

Instantly share code, notes, and snippets.

@zerofudge
Created October 19, 2011 17:59
Show Gist options
  • Save zerofudge/1299123 to your computer and use it in GitHub Desktop.
Save zerofudge/1299123 to your computer and use it in GitHub Desktop.

Revisions

  1. zerofudge created this gist Oct 19, 2011.
    5 changes: 5 additions & 0 deletions gistfile1.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    String hql = "/*+ INDEX(stock idx_stock_code) */
    select * from stock s where s.stock_code = :stockCode";
    List result = session.createQuery(hql)
    .setString("stockCode", "7277")
    .list();