[hibernate-dev] [HSEARCH] Faster way to get a query builder

Emmanuel Bernard emmanuel at hibernate.org
Thu Jan 29 09:19:52 EST 2015


https://gist.github.com/emmanuelbernard/3ca431a8fa58b69cf6c3 <https://gist.github.com/emmanuelbernard/3ca431a8fa58b69cf6c3>

//curent
QueryBuilder b = ftem.getSearchFactory().buildQueryBuilder().forEntity( Hike.class ).get();

//a bit shorter
QueryBuilder b = ftem.buildQueryForEntity( Hike.class ).get();

// shortest but no field overriding
QueryBuilder b = ftem.buildQueryForEntity( Hike.class );

Thoughts?


More information about the hibernate-dev mailing list