1. Why NHibernate simple select in HQL to SQLite database is not working? stackoverflow.comI've recently started using FluenNHibernate and some weird problem appeared when I tried to write unit test with SQLite. I use SQLite in memory database for test, for each test method I ... |
2. Selecting MappedSuperclass from the database (Hibernate) stackoverflow.comProblemI have a@MappedSuperclass called Data as the parent of every Entity in my database. It contains common attributes like Id etc. I then have an entity that extends Data which ... |
3. Hibernate... how does one do database/SQL queries? stackoverflow.comI (think I) understand that Hibernate offers me access to a relational database essentially as if I had a class(es) that matched whatever view(s) I define of some tables. How do I ... |
4. Force Hibernate query to access database stackoverflow.comI have loaded an entity into my transaction and have changed a property of that entity. The transaction is not yet commited. Now I would like to get the original value ... |
5. JPA and order of columns in the database stackoverflow.comI'm using Eclipselink as my persistence provider. Is there any way to specify the order in which the columns appear in the database? The column-order in the database doesn't match the ... |
6. ORM querying with transitive dependency stackoverflow.comHere's is a part of my database schema: So I'm using the tables pages,points and items to generate the layout of my page. To each item is ... |
7. In hibernate how to use not in clause stackoverflow.comi am having two table jobs and production production table has jobid field which refers jobid of jobs table. In hibernate how to use not in clause to achieve following sql query SELECT * FROM ... |
8. Java EE named query join stackoverflow.comI have two entities
and
|
9. Free-form queries to the database over HTTP stackoverflow.comI am working on providing a REST interface to some database tables. I want to provide the client a way to fetch data in a dynamic fashion. e.g. /customer/1234?active=true&gender=M&wealth>100000&... So the idea is to have ... |
10. Hibernate help me write query stackoverflow.comIm making an email client in java. When user creates mail with attachment(document), it saves all the data about email message in database but in multiple tables, like attachement title in ... |
11. problem - database select with hibernate coderanch.comHi, Env: Spring,Hibernate, SQLServer I am trying to fetch the records from "Image" table. My query is pretty simple: public List getAll() { return getHibernateTemplate().find("from Image"); } But the query that hibernate generates is: select image0_.UID as UID0_ from Image image0_ Exception trace: SEVERE: Invalid object name 'Image'. Exception in thread "main" org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: ... |
12. how can i make sql queries database independent using Hibernate? coderanch.comWhich part are you worried about not being database independent? Hibernate abstracts out the database thought the hibernate.cfg.xml file. So, you code Hibernate once, and you just change the entries in the xml file when you switch databases. Hibernate uses HQL, Hibernate Query Language, as opposed to SQL, so even there, you are buffered against a specific database SQL call. >>for ... |
13. How to select all datas from DB using HQL coderanch.com |
14. How to Find specific object using Hibernate from the database.? coderanch.com |
15. Database Query using Hibernate coderanch.comHi, We are working on a migration project. Currently we are using stored procedures for fetching the data which uses linked servers to fetch cross server data. Below is a query to give you some idea. Select C.CompanyName, WHName = case when PO.DelWhID = 0 then 'Multiple' else (select WarehouseName from Server2.Configuration.dbo.Warehouse where WarehouseID = PO.DelWhID) end, IV.CreateDate, IV.ShipDate, PO.PONumber From ... |
16. Cross database query using hibernate coderanch.comCurrently we have 2 databases on our system where we are using linked servers (SQL SERVER) to fetch the data from both the servers (Cross database query). In future we would like to move our Database from SQL Server to MySQL and thus we does not won't to use native sql or stored procedures as it will add extra efforts for ... |
17. Hibernate - connect to database and run query. java-forums.orgSorry for lame question, but I`ve got a problem - can`t connect to MySQL dbs via hibernate with set up plugins in NetBeans IDE. I had created 2 files hibernate.cfg.xml and hibernate.hbm.xml then imported hibernate packeges and class compiled with error: May 22, 2011 9:04:03 AM org.hibernate.cfg.Environment |
18. Database Query using Hibernate java-forums.orgHi, we are working on a migration project. Currently we are using stored procedures for fetching the data which uses linked servers to fetch cross server data. Below is a query to give you some idea. Select C.CompanyName, WHName = case when PO.DelWhID = 0 then 'Multiple' else (select WarehouseName from Server2.Configuration.dbo.Warehouse where WarehouseID = PO.DelWhID) end, IV.CreateDate, IV.ShipDate, PO.PONumber From ... |
19. Problem with using getCurrentSession() to query database forum.hibernate.orgGenerally, the usage of opensession() is not recommended since it opens a new session that needs manual closure since this comes away from spring or container managed sessions. However opencurrentsession() asks the container to get the session that is already open and is the current session in use. Using this is highly recommended! But can you let me know the query ... |
20. Columns order in database forum.hibernate.orgHi, I'm currently using the xml mapping files to create the tables on the database, however I found a problem that I would like to specify the order the fields columns are created in my database and I dont find a way... I'lll post an example: this is my mapping file: |
21. Database query with calculation forum.hibernate.orgHi, hoping somebody can point me in the right direction with a problem I'm having. I need to retrieve a list of locations based on their vicinity to a given Place. So for example, I have "Place" and "Attraction" as mapped entities, both of which have a lat/lng. So in SQL I could do something like: Code: select a.*, SQRT(POWER((69.1 * ... |
22. Order of database access operations performed by Hibernate forum.hibernate.orgHello, as far as I know, when using Hibernate, data base accesses (SQL queries) are executed when arriving at the end of the Transaction code (in the Java source code). This corresponds to what I have observed when debugging. Currently, in the Java code, I am deleting something from the database, then adding another object (actually to replace the former by ... |
23. Query takes very long on different databases with same setup forum.hibernate.orgHello everybody, I use hibernate 3.3.2 on a MSSQL server and I encounter problems while executing a select statement on the same host to different databases. While it works fine for the first database (<5) it takes more than 10 minutes on the other one. During debugging sessions I noticed that hibernate takes all the time at the preparing statement task. ... |
24. Database Query using Hibernate forum.hibernate.orgHi, we are working on a migration project. Currently we are using stored procedures for fetching the data which uses linked servers to fetch cross server data. Below is a query to give you some idea. Code: Select C.CompanyName, WHName = case when PO.DelWhID = 0 then 'Multiple' else (select WarehouseName from ... |
25. Query problems with a Database view forum.hibernate.orgBeginner Joined: Wed Oct 01, 2003 3:35 pm Posts: 33 I have the following mapping file for a database view under MS SQL 2000: |
26. Multiple Databases in a single query forum.hibernate.orgOk.. so I'm happy that hibernate will be fine in my multi-database environment.. I can just provide my own connection. However What if... (and please don't talk to me about this design.. it's not my doing) What if we have (lets make it simple) two databases and a table in database 2 has a foreign key to a table in database ... |
27. Name of the database column in HQL query? forum.hibernate.orgpublic class Evenement implements Serializable{ private Long id; private String initiateur; public Evenement() {} public Long getId() { return id; } public void setId(Long id) ... |
28. Cross database query forum.hibernate.orgJust wondering if there is an easier way to do the following... Each application has a different database, but each application also shares a core database. This core database has User access information/permissions, etc. When performing a query it would be nice if I could do a join with the user_id from the application database and the core database to get, ... |
29. Find out if the underlying DB supports scrollability forum.hibernate.orgHow can I find out thru' Hibernate if the underlying Data base ( JDBC driver ) supports scrollability or not. There is a ScrollMode class which has a public method lessThan. But how do I find thru' Hibernate API what the current scroll mode is or what is supported by the underlying JDBC driver? Before invoking the scroll method on the ... |
30. 'order by' does not work with postgres db forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:3.0[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close():[/b] [b]Full stack trace of any exception that occurs:[/b] [b]Name and version of the database you are using:postgresql 8.0[/b] [b]The generated SQL (show_sql=true):[/b] [b]Debug level Hibernate log excerpt:[/b] Hi, am using hibernate with postgresql database. When I do a simple query such as ... |
31. Accessing two different databases in one query forum.hibernate.org |
32. DB changes not seen by hibernate query forum.hibernate.orgIn my application, I have Folders that contain Documents. Recently, I switched from doing folder.getDocuments() plus hand coded filtering to a complex HQL query: Code: private static final String ADMIN_QUERY = "from Document d join d.folders f join d.latestVersion v left join d.docType dt " + ... |
33. Querying Secondary Cache without hitting the database forum.hibernate.org |
34. Querying Secondary Cache without hitting the database forum.hibernate.org |
35. select across multiple db forum.hibernate.org |
36. querying the database forum.hibernate.orgI am trying to query an oracle database that contains 3 tables, Company, Employee, and Product. Company companyId PK locationId PK other fields Employee ssn PK companyId PK, FK locationId PK, FK other fields Product productId PK companyId PK, FK locationId PK, FK My mapping for the company class is: |
37. Hibernate ORDER BY behaves differently than database!! HELP! forum.hibernate.orgWhen I execute below query in SQL Query analyzer, the resultset order that I get are different than when I run it thro Hibernate. Below is the SQL defined in mapping file. |
38. Criteria queries and database indices forum.hibernate.orgHi, I am using hibernate to query a database of orders. The result set returned is generally in the thousands. We have created indices on the database for the searches. The problem is that while using the crtieria class, expressions or restrictions get added in a certain order. If a certain criteria is not applicable, we would have to skip it ... |
39. encountered SQLException [Database not selected yet.] forum.hibernate.orgFull stack trace of any exception that occurs:2006-05-31 12:03:02,336 ExecuteThread: '13' for queue: 'weblogic.kernel.Default' ERROR pers.global - RuntimeException org.springframework.jdbc.UncategorizedSQLException: (HibernateAccessor): encountered SQLException [Database not selected yet.]; nested exception is java.sql.SQLException: Database not selected yet. java.sql.SQLException: Database not selected yet. at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java(Inlined Compiled Code)) at com.informix.jdbc.IfxSqli.addException(IfxSqli.java(Compiled Code)) at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java(Compiled Code)) at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java(Compiled Code)) at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java(Compiled Code)) at com.informix.jdbc.IfxSqli.executePrepare(IfxSqli.java(Compiled Code)) at com.informix.jdbc.IfxResultSet.executePrepare(IfxResultSet.java(Inlined Compiled ... |
40. Query over tables stored in different database systems forum.hibernate.org |
41. Query across databases forum.hibernate.orgHi all! I already tried to get a solution to my problem in the German forum a few days ago, but unfortunately there haven't been any replies yet. I hope there is a solution, so I'll try here again: I have to make a query across several databases. At the moment, the concept looks thus: DB1 contains meta-information, i. e. it ... |
42. Need to hit database for each query forum.hibernate.orgHibernate version: 3.2 BEA WebLogic: 8.15 Just a simple query, and yes I have tried all possible solutions. I simply want to make sure that Hibernate does not load/persist data in cache, rather it should hit the database everytime. This is what I have done so far: 1) Hibernate configuration: |
43. What query should I use for a linked list database table? forum.hibernate.orgI am interested in using Hibernate to query a table that is a Linked List. One row in my database represents a client. This client can have a parent client and so on. The Linked List relationship is a one to many. One parent can have many children, but one child can have only one parent. The parent may be null. ... |
44. join query using tables in two different databases forum.hibernate.org |
45. selecting from multiple DB forum.hibernate.orgHi, you know if is it possible to make a query referencing multiple DB in HQL? That is: I have three legacy system, each one with its DB (one oracle, one sqlserver, one mysql ...don't tell...), I already have all them in one application using different hibernate configuration files. I want to make a query like select table_from_db_a from Table_from_db_a table_from_db_a ... |
46. Help regarding Retrieving multiple queries in 1 database hit forum.hibernate.org |
47. Can/Should I 2nd-level-cache/query-cache all my database? forum.hibernate.orgHello, I have a web application that runs for a period of 2 months. In the first week users register themselves. After that, there are very minor changes in the database. At week 6, about 5 entities are heavily changed. I have about 70 entities in my system. Should I cache them all (or almost all)? My whole database uses 40MB ... |
48. can we use two database in single query forum.hibernate.orgShards is usefull if you 're looking for horizontal partitioning (for example a Person record is in a different database dependend on where he lives). That doesn't sound like your use case. As far as I know, an entitymanager is for only 1 datasource (so 1 database), so you can't do that directly. You can use different entitymanagers, but you 'll ... |
49. Simple Database query always empty (newbie) forum.hibernate.orgNewbie Joined: Tue May 20, 2008 1:09 pm Posts: 5 Hello, I'm developing an application using Seam, which integrates Hibernate. I've created an Entity Bean named EmailGather, which holds a simple string (email address) and a boolean. I have a JSF/Seam xhtml page that gathers the info from the user, and puts it into the database. This works great, so I ... |
50. Query needed to join Multiple database tables forum.hibernate.orgI have an requirement getProfileIdBySkills(Map skills) Here SkillsInformation is the persistent class.Here languages,servers,technologies,tools,frameworks are of sets type in SkillsInformation class. In each set , i have skills_info_id,skills_name are there. I have to collect each skills_name from each set type and finally i hav to collect all skills_name in a map. And pass that map of skills_name as a parameter to above ... |
51. SQL Query is not getting to the database. forum.hibernate.orgHi, When I make a query with below code it's supposed to return a list of Transfer objects. It works well when I first invoke the call it returns the up to date records from the database however it always returns the very same result of the first call afterward. I'm new to hibernate so your help will be appreciated . ... |
52. database Query pasing for HQL Queries forum.hibernate.org |
53. how can i find the po object by the pure db column name forum.hibernate.orgHi,guys,i encounter a problem with hibernate .I have two po : RecruitCollegeMajor implements BaseBean { private Integer collegeMajorId; private BaseCollege baseCollege;//a foreigner key(in the db table is collegeid) . . . } BaseCollege implements BaseBean{ private Integer collegeId private String collegeNum; . . . } if i know the column collegeId of the database table RecruitCollegeMajor ,how can i know the ... |
54. How to count every database call forum.hibernate.orgHello each and everyone, In order to count all database calls do you by any chance know a better way than wrapping the jdbc driver ? Basically I need the measure the number of queries and time spent in the database tier (I have Spring 2.5 and Hibernate 3.3). Any help is quite much appreciated... Thanks |
55. Multiple DB providers and DB selection forum.hibernate.orgGood afternoon, I have an application with a login page that allows you to select the DB you wish to connect to via a drop-down list. What is the best way to accomplish this without imposing a fair amount of overhead for the other db providers that are not actually used during the lifecycle of the application (one and only one ... |
56. Could not Query DB. could not initialize a collection forum.hibernate.orgAuthor Message jl061403 Post subject: Could not Query DB. could not initialize a collection Posted: Thu Aug 27, 2009 3:09 pm Newbie Joined: Wed Nov 12, 2008 12:16 pm Posts: 15 I cannot figure out what i am doing wrong here - but for some reason i can't initialize my collection and my table can't be found. Any help ... |
57. Customising Queries for a very simple DB forum.hibernate.orgHi there, this is my first post ever in the forum. Nice to meet you all. How do I change the Queries created by the SchemaGenerator class? I got a really simple JDBC Driver ( don't even support the NOT NULL statement) that can't parse the regular queries. I want to use the hbm2dll feature of Hibernate but it need to ... |
58. hibernate query...how to connect two databases... forums.oracle.compublic void setId(int id) { this.id = id; } public int getId() { return id; } public void setAccount(String account) { this.account = account; } public void setPassword(String password) { this.password = password; } public void setBalance(String balance) { this.balance = balance; } public String getAccount() { return account; } public String getBalance() { return balance; } public String getPassword() { ... |