Hibernate is a collection of related projects enabling developers to utilize POJO-style domain models in their applications in ways extending well beyond Object/Relational Mapping.

learn more… | top users | synonyms

1
vote
1answer
24 views

fetching multiple entities using HQL

Is it possible to fetch multiple entities using HQL? I find myself writing a lot of code like: obj1 = HQL1; if (obj1 == null) obj2 = HQL2; So I am wondering if it is possible to fold the obj1 == ...
0
votes
1answer
18 views

How inject an EntityManager to a EJB? What is wrong in this situation?

I am trying to run a web application on Glassfish Server. When my DAO is coded like this I have no problems on my test page. I can get all the customers and see them on the datatable. @Stateful ...
0
votes
0answers
6 views

How to view the inserted rows when JPA testing with arquillian / hibernate?

I have an arquillian unit test that is writing a Note and passing the unit tests. Now I would like to actually view what is being persisted into my SQLServer database. When I open up SQLServer, I ...
5
votes
1answer
46 views

NullPointerException when accessing lazy loaded collection within DAO method

I'm having a strange issue with Spring and Hibernate when running multiple threads in an application. I'm using spring 3.2.0.RELEASE and hibernate 4.1.12.Final. The issue is that for some objects, ...
0
votes
0answers
17 views

getting error: Could not load JDBC driver class [org.postgresql.Driver]

I'm trying run a Junit test,have configured before only projects without maven, now i am trying to make this integration, but i stop in this following error: java.lang.IllegalStateException: ...
0
votes
2answers
22 views

Where Hibernate Databases are stored?

Context: I'm working on Spring MVC project and using Hibernate to generate database from my classes using annotations. It uses MySQL server running on my local machine. I'm aiming to get hosting and ...
0
votes
0answers
22 views

Hibernate doesnt save files to database

I am trying to save files to derbi database (tables are not created). My cfg.xml file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC ...
0
votes
0answers
12 views

Fetch database comments using hibernate

I need to fetch database comments from a postgresql using hibernate. I have read the documentation but could not find any hints on how to get the comments. Basically I am generating Pojos and would ...
0
votes
1answer
15 views

How can I get a String from this Geometry Object with hibernate and PostGIS

I would like to return the output (Output is "0101000020E610000000000000000024400000000000002440" in geometry type) of this SQL Postgis query select ST_GeometryFromText('POINT(10 10)',4326) in Java ...
0
votes
2answers
37 views

Performance tests with hibernate and jdbc [closed]

Good afternoon, I'm developing my serach on university a comparison between Hibernate and JDBC, and a major focus of the work is on performance. One question that I am being charged too is related ...
0
votes
0answers
20 views

Hibernate session not updating bean when using Lock

When i use the method lock(to turn persistent a transient instance), the method update (from Session) don't do nothing! My code is this: session.getTransaction().begin(); ...
0
votes
0answers
13 views

org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host

I am writing a web application that uses Hibernate to connect to Heroku Postresql. Everything works fine when the application is deployed to Heroku but I get the following exception when I run the ...
0
votes
0answers
13 views

CriteriaBuilder Predicate isMember using only entity ID

Given the following entities, how can I construct a JPA Predicate to select only those Items that have a Category with a given ID in their categories set? @Entity public class Item { @Id private ...
0
votes
0answers
13 views

orderBy field not working with hibernate and mongoDB

I have a mongoDB set up that I access via GORM and I want to search for a param and then possibly orderBy another param. This works just fine for another search function I am using that is connected ...
0
votes
1answer
26 views

HQL - unusual queries

Using Northwind database I would like to make queries like Number of orders from each Customer.Country What is the sum of OrderDetails.UnitPrice for every day of week Average time from ...

1 2 3 4 5 1641
15 30 50 per page