Friday, July 18, 2008

Ambiguous Method Result

 /**  @deprecated  TODO: this bad code, do not use it */

public TeamGame fetch(Game game)

{

Query query = getSession().createQuery("select gameSummary from TeamGame gameSummary where teamGame.game.id = " + game.getId());

List list = query.list();

if (list != null && list.size() > 0) { return (TeamGame) list.get(0);  }

return null;

}