time « Fetch « JPA Q&A





1. fetching records by using hql and criteria is taking more time    coderanch.com

Hi All I have a hql query , when ever i iam getting 400 -500 records it is taking 3-4 sec. but when iam getting around 5000 record it is taking more time around 3 min in local system. the method is public List getAllSourcedCandiadtes(String startingDate, String endingDate) { return (List) getHibernateTemplate().find( "select distinct prospectiveCandidates from ProspectiveCandidates prospectiveCandidates where prospectiveCandidates.appliedDate between ...

2. store and retrieve date and time in mm-dd-yy- hh:mm    forum.hibernate.org

Hi, Can someone explain me how to store current date and time in mysql. and I want to display something like mm-dd-yyyy hh:mm on front end. I am currently using DATE type. @Temporal(TemporalType.DATE) public java.util.Date date; The problem I have now is ,it is storing just the date and when I save the date using ajax it displays my date in ...

3. How to retrieve data about date and time?    forum.hibernate.org

In SQL Statement, we can use some date and time function that are different in different database system. For example, in SQL Server 2000, datediff and dateadd. I can use a SQL in hibernate but if I do like that My codes can't be applied to different database. The purpose of hibernate is to make the databases no difference in java ...

4. eager fetching two one-to-many associations the same time?    forum.hibernate.org

hi i had similar problems with hibernate 3.1 and i fixed it by doing this stupid code: Code: ... criteria.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP); criteria.setFetchMode(attr1, FetchMode.JOIN); ...

5. How to fetch Date and Time using Order by Clause?    forum.hibernate.org

Hi Friends, I m trying to fetch the data from the db with order by as Created Date ,the Date contains the below structure 1. 17-OCT-07 05.54.48.807000000 PM 2. 17-OCT-07 05.56.41.051000000 PM 3. 18-OCT-07 11.03.33.477000000 AM 4. 17-OCT-07 08.16.24.906000000 PM when i tried with order by it came in below order result:3,1,2,4 Expected o/p: 3,4,2,1 Can you please any one help ...