data « Query « JPA Q&A





1. What are my options to store and query huge amounts of data where a lot of it is repeating?    stackoverflow.com

I am evaluating options for efficient data storage in Java. The data set is time stamped data values with a named primary key. e.g.

Name: A|B|C:D
Value: 124
TimeStamp: 01/06/2009 08:24:39,223
Could be a stock ...

2. Data structure to hold HQL or EJB QL    stackoverflow.com

We need to produce a fairly complex dynamic query builder for retrieving reports on the fly. We're scratching our heads a little on what sort of data structure would be best. It's ...

3. Getting Data from all tables instead of one with HQL Query that should only get 1 table's data    stackoverflow.com

I have created 3 tables in my database and put data into them. The 3 tables all have foreign keys joining them together. Below are the table classes and ...

4. Using Hibernate's ScrollableResults to slowly read 90 million records    stackoverflow.com

I simply need to read each row in a table in my MySQL database using Hibernate and write a file based on it. But there are 90 million rows and ...

5. problem with determining data type of query column in hibernate    stackoverflow.com

I have written below query in hibernate and it is giving me NullPointerException

SELECT new com.reddy.ReddyDTO( col1, IF(STRCMP(COL8, 'zero')=0, 'string', col2) ) 
FROM entity
However it is throwing me NPE as it was ...

6. How to get Clob data from native query?    stackoverflow.com

I have tried this:

List resultList = session.createSQLQuery("select pack.FuncName ClobData from dual").list()
whereis FuncName it is the name of function that returns clob data. But in resultList I see some proxy ...

7. How could I express this dynamic data model query with JPA?    stackoverflow.com

I'm developing a JPA based app where I have the following model: alt text It represents a dynamic data model where I define a Type which is composed of some TypeField. ...

8. hql query bringing in too much data    stackoverflow.com

I would like the query below to return an Employee object that has Allocations which fall within the requested range of dates. The query returns all Allocations though. It is also doing ...

9. How to group selected data?    stackoverflow.com

I have a comments tables from which I want to select and group comments by its foreign key profile_id. I'm using jpa 2/hibernate and the tables have a one-to-many relationship from profile ...





10. HQL query - pulling data through a bridge relationship    stackoverflow.com

I am having trouble with a relatively simple HQL query being called from a jsp page through a javaBean. I am just setting things up for testing at the moment to ...

11. hibernate query nothing in a time range where data exist    stackoverflow.com

Hi: I meet a very strange problem when I use hibernate to do some querying: This is the core codes:

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    start ...

12. Grails: populate a domain with data from cross join: hql, criteria, SQL query?    stackoverflow.com

i'm a little bit stuck with that question. Let's say I have a domain class:

class Activity {
    String activityID
    String activityDescription
    String activityType
}
and ...

13. Translating data mining sql-queries into Grails equivalents?    stackoverflow.com

I would like to build a web interface to present logdata. This should be a nice opportunity to try to build a little web app using Grails, which I have been ...

14. query with hibernate gives wrong data    stackoverflow.com

When I run this query in DB

SELECT p.id,p.processName, ph.description,ph.creator_id 
FROM process p,  process_history ph 
WHERE ph.approval=0 
AND p.id=ph.process_id 
AND p.isProcess=1 
ORDER BY editDate DESC 
It returns me this value
id ...

15. Why is my Hibernate Query returning stale data?    stackoverflow.com

Quick Version Basically, I'm updating a Hibernate Table and subsequent queries are loading a stale value. Detailed Version Hibernate (3.3.1.GA) and EhCache (2.4.2). Persisted Book object with a List<PageContent> of pages and I'm adding a ...

16. Non-Trivial Data-Query in Grails    stackoverflow.com

imagine the following problem in grails you have some kind of audit trail domain class with numeric properties. For instance a class in which the current burndown value of your scrum project ...





17. urgent help need with HQL query to filter date from datetime data    stackoverflow.com

i want to convert datetime format to string format in hql count. for example... i have redundant attendance data in each day of month of multiple employee which i need to ...

18. Sum of data for current week using projection queries    stackoverflow.com

I want to do a total of fields in database for the current week. For eg, If today is wednesday, I want to do a total of current Monday through Wednesday, ...

19. Is it possible to select data that exists in both entity collections?    stackoverflow.com

I have two entities that contain collection with @ManyToMany and I need select data that exists in both collections. My classes are like:

@Table(name="r")
class R {
    @Id
    ...

20. How to query data base on Date, but your DB store date as date + time.     stackoverflow.com

Since I want to store date and time for each data in table X, I use

@Temporal(TemporalType.TIMESTAMP)
private Date dateProcess;    //java.util.Date
and this work great. But now I want to create ...

21. JPA for querying in-memory data    stackoverflow.com

During an import procedure, I read tabular data from excel sheets. I want to perform some operation on this data: I want to sort, search by key, filter etc. Is it ...

22. Struggling to optimize N+1 query in Hibernate    stackoverflow.com

I’m struggling to improve a n+1 query on a project I’m working on. I use Hibernate with the model shown below, and I want to express a query to retrieve all ...

23. How to construct a Hibernate query for generating time-series graph data    stackoverflow.com

There exists a Hibernate entity

WeatherStatistic  
which contains snapshots of atmospheric data at given times. If the WeatherStatistic had only 1 type of atmospheric measurement, eg. temperature:
| time   | temperature ...

24. HibernateTemplate.find returns the correct number of rows but with the same data    stackoverflow.com

Product Class

@Entity
@Table (name="product")

public class Productimplements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID ...

25. Hibernate SQL QUERY, problem with TEXT data type in mysql    stackoverflow.com

I need to perform a sql query with hibernate ( no mapping ) but i keep getting this error whenever a field has a TEXT data type in MYSQL :

org.hibernate.MappingException: ...

26. Restricting hibernate queried data based upon the owning group of a user    stackoverflow.com

The standard example is probably where you offer a service to multiple companies on the same hosted instance and want employees to be able to see data only from other employees ...

27. Hibernate: get rid of selected data stored in heap after reading it    stackoverflow.com

I got this app that all it does is perform selects and after I'm done reading that I no longer need the objects at all. I got no problem reading the data, ...

28. Old data returned when using JPQL createQuery    stackoverflow.com

Using JPA/Eclipse TopLink. I'm updating a table (using createNativeQuery) as shown below:

Query query = em.createNativeQuery("UPDATE Products SET productName='" + p.getProductName() + "',productVendor='" + p.getProductVendor() + "',productDescription='" + p.getProductDescription() + "',quantityInStock=" + p.getQuantityInStock() ...

29. JPQL: Retrieving data from a multi select query    forums.netbeans.org

Hello, I have a multi select query and I need to retrieve all those fields in an object that will be display in a JSF 2.0 page. This is my method ...

32. JPA data retrieval query    coderanch.com

Thanks Paul for the reply . I forgot to mention an important req from my end This user_lov has a FK in a separate table ( user_address ) Relationship from user_lov to user_address is a One to many I was wondering if I need to write a sql query with inner joins ? If I do the necessary annotations in my ...

33. HQL Query that retrieves data without case sensitivity    coderanch.com

Hi, my requirement is like this I had an emp table where it contains empno,empname, etc now i write a query which fetches data using where clause of empname, which is like this from emp e where e.empname='f%' The above query only retrieves the emp records whose name starts with f ( small f not a cap f) Now my requirement ...

34. JPA/Hibernate: Selecting data from second database?    coderanch.com

I have two databases that I need to access from my application. They are both part of the same MySQL instance. While I can connect to the database that I declared in the connection, I am not sure what they best way of accessing the second database is. Can anyone advise me on the best way to do this?

35. HQL not selecting data added through backend    coderanch.com

I have one page which shows list of employees. Now load this page in browser and it shows 1 employee. I add employee directly in database through backend procedure( Now table contains 2 employees). When I refresh my webpage which shows employee list, it does not contain newly added employee through backend procedure. When I do refresh on web page, I ...

37. Hibernate: query returning data from multiple tables    coderanch.com

I have very recently started working with hibernate and things were moving fine when the queries were getting columns from a single Table. I have a hibernare query which returns data from multiple tables. It selects data from three tables based on a join condition 1. tbl_site 2. tbl_ste2sitmgr 3. tbl_sitemanager tbl_ste2sitmgr is basically a link between site and sitemanager, and ...

39. Read only data - sub query    forum.hibernate.org

Hi All I have a table with 500 rows of static data. Each row has a date colum. My queries will be to get matching rows between 2 dates. I wrote a program which uses query cache, loaded whole table using select * from table, then I thought subsequent queries which put date constraint like "select * from table where date ...

40. Getting error while selecting data fromtable.    forum.hibernate.org

sharad_garg Post subject: Re: Getting error while selecting data fromtable. Posted: Thu Feb 25, 2010 9:41 am Newbie Joined: Thu Feb 25, 2010 9:05 am Posts: 9 ***************** CnxContact.java ***************** package persistent.core; // Generated Feb 25, 2010 6:21:46 PM by Hibernate Tools 3.2.2.GA import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import ...

41. same data always return from query, seems like cache problem    forum.hibernate.org

I've got hibernate 3.3 query which retrieve data from db using HibernateTemplate.find with spring. The query have 2 parameters, one of the parameter is always static when i notice the problem. The query always return the same resultset even though I've deleted that record from the database, restarted the web server. Can you tell where is the problem? Thanks,

42. Hibernate deletes data in the wrong order - causes fk probs    forum.hibernate.org

What I personally suggest is to use the cascade delete option only for real 'child' objects. In UML this would be aggregated objects (in contrast to associatated objects). If you apply cascade delete option on unidirectional ManyToOne associations, then you easy will run into this problem as soon an entity is associated by more than one entity. And: Unidirectional associations I ...

43. hibernate query returns null for data from table    forum.hibernate.org

Author Message rahuldeepak Post subject: hibernate query returns null for data from table Posted: Sat Mar 06, 2010 8:15 am Newbie Joined: Sat Mar 06, 2010 7:50 am Posts: 2 Following is the log when I run my application : [color=#80FF00]Apache Ant version 1.7.1 compiled on June 27 2008 Buildfile: D:\rkp\workspace\AccountData\build.xml parsing buildfile D:\rkp\workspace\AccountData\build.xml with URI = file:/D:/rkp/workspace/AccountData/build.xml Project ...

44. configure/Refresh data from DB and not frm 1st level cache    forum.hibernate.org

Hi, We have different instance of an application running on each machine.We are using Hibernate with MYSQL DB to persist the data.We have configured to use primary key generation like, @GenericGenerator(name = "generator", strategy = "increment") But facing issue when the Instance is started with the DB conncetion created. THe generator fetches the ID from the First level cache.It does not ...

45. One-to-many select data to object.    forum.hibernate.org

I have two tables offer and image. Offer can have 3 images; offer( id ... ) image (id, offer_id, name, ... ) NetBeans generate two hbms for me. Offer.hbm (...) and Image.hbm public class Offer implements java.io.Serializable { private int id; private Set images = new HashSet(0); (...) ...

46. How could I express this dynamic data model query with JPA?    forum.hibernate.org

Hi! I'm developing a JPA based app where I have the following model: It represents a dynamic data model where I define a Type which is composed of some TypeField. Each TypeField represents a data type definition (contains attributes like name, description, etc.) which can be of any kind (String, Date, Boolean). Then I have some nodes which represent instances of ...

47. ScrollableResults flush causes data download    forum.hibernate.org

Hello, I'm using MS SQL server 2008. I'm trying to modify a table with millions of rows of data using ScrollableResults. With a "regular" session. The problem is that doing a flush ends with a out of memory error, even when I do the flush after changing the first row. From the network activity, it seems that my application starts to ...

49. what type should I use if I need to do paging of data?    forum.hibernate.org

im a little confused as to what type should I use if I need to do paging of data. things I need to do are typical previous row/next row paging and also previous 50 rows/next 50 rows paging i've been using set all along, but then I read that Sets were not ordered then with further reading it mentioned using order-by ...

50. How to Query Multiple Data Stores    forum.hibernate.org

Hi, I am very new to Hibernate (2.1.3). I have a problem. I have a database design such that some data is stored in a relational Database whereas some data is stored in XML Files. Now i need to Query the two objects which contain the related data. Say for ex : Product Id's in Relational Database A and Product details ...

51. Can Hibernate select data from a database VIEW?    forum.hibernate.org

53. Querying multiple data sources.    forum.hibernate.org

I started to develop persistance using Hibernate, a few weeks ago. Right now I'm facing a problem I can't figure out how to solve. My app use data from two different datasources to populate a class. I will try to briefly exemplify my situation. Code: package database.one; //let's say this one is my production database. /** * @hibernate.class table="A" */ public ...

54. Select updates data?!    forum.hibernate.org

Beginner Joined: Sun Oct 12, 2003 2:14 pm Posts: 25 Location: Zagreb, Croatia I have problem in Hibernate 2.1.4, when I select data Hiberneta does update data in database. There is not "is dirty" in log, the only problem I saw is: 2004.08.01 01:19:16 net.sf.hibernate.util.ReflectHelper getBulkBean INFO: reflection optimizer disabled for: sd.hibernate.Smjena, BulkBeanException: Cannot find specified property (property setPonedjeljak) Here is ...

55. session.find return stale data even after clear and evict    forum.hibernate.org

just providing a code update session = sessionFactory.openSession(); for (int i = 0; i < 10; i++) { myClass = new MyClass("ricky"); session.saveOrUpdate(myClass ); session.evict(myClass ); } session.clear(); session.flush(); session.close(); sessionFactory.evict(SystemEndpoint.class); // tried about everything to get rid of the saved objects on the session session = sessionFactory.openSession(); myClassList = session.find("from MyClass"); // returns the previously saved but non committed objects ...

56. HQL doesn't return data but sql query does it    forum.hibernate.org

57. Data is not refreshing    forum.hibernate.org

I have a problem with data not being refreshed. Let us say there are 5 records in the table and when I do findAll(), it returns 5 records as expected but when the hibernate application is running, I go to the database and add one more record manually, the hibernate application is not picking up the sixth record, it still picks ...

58. Selecting data using a Date Column    forum.hibernate.org

Hello, I'm querying my oracle database using different search criteria from the user input. In the database i have a table called Deals and in this table a column field called COBDATE, which is mapped using java.util.Date to the corresponding java class. I can query using any column/attribute but i get errors every time i query by cobdate. The user input ...

60. Selecting Data as readonly    forum.hibernate.org

Hibernate currently provides a way to denote a class as immutable, and thus shoudlnt be dirty checked (as it cannot change). Is there a way to denote that the resulting objects of a query are to be considered immutable for the session unless explicitly passed to update? The issue is that we have considerable amounts of data in a long running ...

61. why hibernate update data after selected?    forum.hibernate.org

Newbie Joined: Sun Aug 14, 2005 1:30 am Posts: 4 Hibernate version:2.1 when i load or query a project or user, hibernate will auto update the project or user which was loaded by select. why? Mapping Documents: User.hbm.xml: Code: ...

62. execution of self-defined SQL/HQL query for inserting data    forum.hibernate.org

Hi jdl, hello all, following scenario: I'm using hibernate 3.0 . My object Inst has an attribute type. Depends on the value of this attribute, instances of Inst should be mapped on different tables. For evaluating we are using mySQL, target platform is Oracle. I wanna do the dispatching (deciding, which table should be taken for an instance) by configuration, if ...

63. counting number of rows without retrieving data    forum.hibernate.org

I am trying to retrieve the number of rows returned with out retrieving the data, can anyone help me how to do this. I tried some thing like this select count(*) from table11 join.. where .... Usually select .. from ... returns a list but I need the result into an int variable which gives me the number of rows with ...

64. Data being deleted on a simple query    forum.hibernate.org

Newbie Joined: Wed Aug 31, 2005 8:06 pm Posts: 5 Hi, I'm having problems with a fairly simple bi-directional relationship (one-to-many). These objects are not in a Parent/Child relationship, but when I do a query on the top level object, hibernate deletes all the objects from the db for both the top level and the lower-level object. Below is all the ...

66. Exclude specific data in SELECT    forum.hibernate.org

I'd like to know if it is possible to exclude specific data (columns) when retrieving data via hibernate. I know i could simply drop the according property from my mapping descriptor, but what's about if i want to dynamically exclude properties? My current work around is to "cleanup" the resulting object or list of objects, but if you have thousands of ...

67. use projection to write data to database    forum.hibernate.org

68. could not execute query / no data found    forum.hibernate.org

I use the following mapping file to map a join table "VXLucieProduitLotProjet_NEW" wich used to retrive the many to many association between "VXLucieProjetLotProjet" and "VXLucieProduit". If I don't use a subselect into the join tag, I have the errors : could not execute query no data found But if I run myself the generated request on the database, there are results. ...

69. Correct row count, but repeated data    forum.hibernate.org

Newbie Joined: Tue Aug 30, 2005 9:04 pm Posts: 9 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: hibernate 3.1 Mapping documents: Code: ...

70. Hibernate 'Data update' query    forum.hibernate.org

Hi , We are using hibernate as our Data Access Layer in a Service Oriented environment. I have a query regarding the 'data update' in hibernate. How do we update a 'detached' object in hibernate based on criteria other than 'primary key' without first retrieving the object ? Ex: I need to update a single user attribute 'attr1' based on the ...

71. Hibernate caches queries an give obsolete data back    forum.hibernate.org

Session sess = SessionFactoryHelper.getCurrentSession(); Query q = sess.createQuery("from RmsBenutzer where status = "+status.intValue()+" order by upper(login)"); q.setCacheRegion("CacheRegionOfTheRMSUserList"); q.setForceCacheRefresh(true); List testuserlist = q.list(); sess.flush();

72. data can't be refresh after DB update    forum.hibernate.org

73. how to use of data from criteria.projection.sum(data)    forum.hibernate.org

Hibernate version: Hibernate 3.0.5 Using criteria I have to retrieve some columns using aggregate funtions from one table itself. The sql query looks like this "select count(emp_id),sum(savings_sal),sum(misc_sal) from emp_table where condition1 and conditon2 and conditon 3" Here I receive the condition parameters from a jsp page and I may recieve any combination of conditions(i.e I may receive only 1 condition or ...

74. SELECT not using 'intermediate' data in session    forum.hibernate.org

75. ScrollableResults, get data by column name?    forum.hibernate.org

Hi, I was trying to recover a large amount of data using Query.scroll() and the ScrollableResults object returned. The problem was that there's no way to get column data by column name (ScrollableResults interface has only 'getXXX(int index)' methods), so now I'm using the JDBC approach and working with javax.sql.Connection, javax.sql.PreparedStatement and javax.sql.ResultSet. My question is if there will be 'getXXX(String ...

76. How to Retereive data from table by ORDER BY on some column    forum.hibernate.org

Hi I need a small help in getting the data as per the order by id. I am building a menu that has sub-menus. In SUB_MENU table I also have a order_by column and in my hbm.xml file I specify order-by on that column it returns me data in correct order. ParentMenu does not have order_by column how can I get ...

78. Hibernate Query with "set" type data    forum.hibernate.org

Hi, I have a table "contratti" that contains a set of elements. I need to build a query that checks if an element or more is contained in contratti. What is the sintax to use? I did this way, but it doesn't work: "FROM anagrafica as a where a.contratti.elements(nome)=:contratto" anagrafica is a pojo which has a property : "Set contratti". thanks ...

79. Oracle Meta-data Table Select problem    forum.hibernate.org

Hi, Here at the lab, a co-worker friend created a program that read csv files (excel tables), compared the data with data from a meta-data table that Oracle creates automatically for every base (in this case, a specific one) and created scripts to populate another base. Everything done using SQL queries. Now, I'm trying to replace the SQL stuff with Hibernate ...

80. Select clause contains too much data    forum.hibernate.org

Author Message ndgroote Post subject: Select clause contains too much data Posted: Tue Dec 12, 2006 9:36 am Newbie Joined: Sun Feb 13, 2005 6:39 am Posts: 11 Location: Belgium Hibernate 3.0.5 All, I'm generate a Query using the Criteria API using the Example API and the Restrictions.idEQ() method. The result of such a query looks as follows: Code: ...

81. QBE with partial data    forum.hibernate.org

Hibernate: select this_.id as id4_0_, this_.creationTimestamp as creation3_4_0_, this_.status as status4_0_, this_.dlfSiteRef as dlfSiteRef4_0_, this_.transmiss ionNumber as transmis6_4_0_, this_.transmissionTimestamp as transmis7_4_0_, this _.interfaceType as interfac8_4_0_, this_.valid as valid4_0_, this_.manualInd as manualInd4_0_, this_.operatorRef as operato17_4_0_, this_.productRef as productR ef4_0_, this_.locationRef as locatio10_4_0_, this_.scanDate as scanDate4_0_, thi s_.scanTime as scanTime4_0_, this_.scanner as scanner4_0_, this_.stockOutInd as stockOu22_4_0_ from transferrecord this_ where this_.type=0 and (this_.creationT ...

82. Hibernate Query returning out-of-date data    forum.hibernate.org

Newbie Joined: Thu Jan 11, 2007 11:24 am Posts: 7 Dear all, I have a very difficult problem to track down. I have automatically generated Java classes by using MyEclipses Hibernate reverse engineering options. I have a JSP front-end, which allows the user to update and view data from this table. I'm committing all my transactions etc. as appropriate. The problem ...

83. How to select data from PostgreSQL database?    forum.hibernate.org

Hi Can someone please help? i'm trying to select data from a table in PostgreSQL. My table in PostgreSQL is called NAMES and already has some data in it. how do i retrieve that data? this is my hibernate.cfg.xml org.postgresql.Driver "jdbc:postgresql://tren-sa-dev" admin admin01

84. Strange: Criteria query cause data deleted and inserted?    forum.hibernate.org

Hi, When I debug a open source project, I found that the underlying hibernate works weirdly: A simple query will cause related tables rows be deleted and re-inserted. Maybe this behavior is to keep data in memory and database synchronized? But this behavior will cause performance problem and unexpected result, I think. Can anyone give some hints to avoid the unnecessary ...

85. Old Data Sometimes Returned From HQL Select    forum.hibernate.org

Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message greenbean Post subject: Old Data Sometimes Returned From HQL Select Posted: Mon Oct 29, 2007 6:22 pm Newbie Joined: Wed Jun 27, 2007 1:52 pm Posts: 1 I am running into an issue where it appears ...

86. Projections returns a wrong data type?    forum.hibernate.org

This Criteria query works fine without the Projections. To get a unique result, I added Projections. It seems that Projections only returns String data type. How to solve this problem? Thanks very much for your input in advance. Hibernate version: 3.x Mapping documents: Code:

87. Sorting association data    forum.hibernate.org

Hi. I have two related objects, Account and LineItem. See end of this post for hibernate mapping data. In "view" type situations I would like to sort the LineItems associated with an account. I would like the user to control the column used for sorting so this sorting must be at run-time, preferably at the database. I can succesfully sort LineItems ...

88. HQL: get "extra data" when executing the query    forum.hibernate.org

Is there a way to retrieve "extra" data through HQL ? I can write "extra" when i map a collection, and when i execute the HQL i will get some extra data on it. but i want to perform an HQL which specify on some "field" to "retrieve" the "extra data" and not on the mapping. BTW, the association is of ...

89. Criteria query with Long data type.    forum.hibernate.org

Hi All, 'Ticket Id' property in hibernate class is defined as 'Long' data type. In data base it is having row for TicketId# 69 and I'm using below criteria for getting the data for this record Criteria crit = HibernateUtil.getSessionFactory() .getCurrentSession().createCriteria(HelpManager.class); crit.add(Expression.idEq(TicketNo)); result = crit.list(); In log, it is created below query: In HelpManager submitCriteria TicketNo:69 Hibernate: select this_.TICKET_ID as TICKET1_3_0_, ...

90. How to stop refreshing whole data after update ?    forum.hibernate.org

91. Hibernet query returns null for XML data type    forum.hibernate.org

92. HQL Queries not reflecting latest data from database    forum.hibernate.org

Newbie Joined: Fri Aug 05, 2005 2:56 pm Posts: 11 I currently have an issue when I run an HQL Query. I populate data into my tables and run the application. When I execute the HQL query below I get the initial data populated in the database. I then manual update the data in the database via the MySQL command line. ...

93. Hibernate giving Wrong Data while query generated by Hiberna    forum.hibernate.org

Newbie Joined: Mon Aug 11, 2008 12:26 pm Posts: 2 Hi All, I have a very strange problem, the data return by Hibernate by doing is query.list() is incorrect but when i check the query printed by hibernate in log and run it on database it returns the correct data. Hibernate version: 3.0 Mapping documents:

94. selecting data from multiple tables    forum.hibernate.org

I am begging for help, I'm absolutely feckless. I'm using hibernate with JBoss Seam, everything goes well, but i don't know how to create entity from two or more different database tables, joined on some of their foreign keys. If there is no @Table annotation after @Entity annotation in java entity class, i receive exception, that database table which corresponds with ...

95. HQL Query that retrieves data without case sensitivity    forum.hibernate.org

Hi, my requirement is like this I had an emp table where it contains empno,empname, etc now i write a query which fetches data using where clause of empname, which is like this from emp e where e.empname='f%' The above query only retrieves the emp records whose name starts with f ( small f not a cap f) Now my requirement ...

96. Problems with data selection.    forum.hibernate.org

Newbie Joined: Tue Dec 09, 2008 7:36 am Posts: 1 Hibernate version:2.1 Hi, all! I have got a problem: There are 3 entities: Account, Card, Person. Account related to the card within ISS_REF_TAB table, Card related to the Person within the same table. Code: @Entity @PersistenceUnit(unitName="smartbo") @Table(name = "ISS_ACCT_TAB") public class AccountBO implements Serializable { private static final ...

97. Data duplication in Query output.    forum.hibernate.org

Newbie Joined: Wed Feb 04, 2009 9:10 am Posts: 4 Hi, I have recently started using Hibernate. I have been going through the online documentation, to understand how to use Hibernate. I am facing trouble with querying a table. This table has 14 records. On querying the table with using hibernate, the first record gets duplicated 14 times. But, if I ...

98. Hibernate queries does not return newly inserted data    forum.hibernate.org

First my apologies, for posting on the .NET forum. Sorry. We have two applications. One of them have been developed using Hibernate (v3.3.1.GA) using Mysql (connector v:5.1.7). The second application is a legacy application. The legacy application inserts rows into mySQL. The hibernate application queries the data to display. But what we find is that the query does NOT pick up ...

99. Hibernate querying Temporary Data    forum.hibernate.org

Our issue is the user inputs a list of values which are a unique index into a table. But we need to return the results in the order entered by the user and we need to return not found values. Also we need to be able to page the results. The normal solution would be to insert the values in a ...