Issue with writing a criteria /hibernate query? -


How can we write the following SQL queries in the criteria query and also in the Hibernate query?

The following types of sql queries, select

  - Test ID DESC limit 1 from table 1 command;  

I have written as follows,

Standards TobaccoID = SessionFighter .getCurrentSession (). CreateCriteria (table1.class); TobaccoID.add (Restrictions.eq ("surveyId", send_Survey)); TobaccoID.addOrder (Order.desc ("testId")); // How can I specify 1 limit here in the tobacco id? Restrictions ("Restrictions" ("Algorithm", Lifestyle Hbbs on)); Tobacco id.ed. (restrictions .ec ("string no", "01")); Scrollable tobacco idp = tobacco id. Scroll ();

But I do not know how I can set limits here.

Any suggestions.


Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -