Questions for hibernate


How to use hibernate properly

I have following code in my application each time I want to do some action with hibernate:

Question about Hibernate POJO class design

I am learning hibernate and have a question regarding the design of my POJO class

Querying a many to many join table with HQL

I need some advice for creating a hql query.

hibernate auto-discovery and generation of of database mappings to POJOs

Are there any tools that auto-generate the hibernate POJOs by gathering information from the database?

Naming convetion when using hibernate

Me and my team are building java EE app as a school project and we've decided to use hibernate. We also want to make the whole project as nice and clean as possible, so we're trying to follow recom...

Unable to use table named “user” in postgresql hibernate

When I try to persist an entity called "user" with JPA/hibernate it does not work. The table is not created and it is because user is a reserved word in postgresql. Is there any way other than nami...

Random object from database with GORM

I would like to get a random object from database only with GORM, without using database specific code.

Hibernate and Spring transactions - using private constructors/static factory methods

We have a Hibernate/Spring application that have the following Spring beans:

TransactionRequiredException: Executing an update/delete query

I'm having a tough time finding a solution to my problem.

What is the object type returning in a join of a hibernate query

When I have the below query it will give me a list of Product.

HibernateUtil initializig error on the webserver

I hav a webserver and when I try to use the hibernate util I get an excpetion (returned to the client):

Problems mapping UUID in JPA/hibernate

According to the documentation, hibernate 3.6 should have support for the java.util.UUID type. But when I map it like:

Deleting some data as a periodic/scheduling job In Java

I am working in Java project with Spring and Hibernate framework. The database used is Oracle and application server is JBoss 4 and OS is Unix.

Relation between type, attribute, instance and value

I'm developing an Java-application which stores its data via Hibernate in a database.

How do I write a MAX query with a where clause in JPA 2.0?

I'm using JPA 2.0. Hibernate 4.1.0.Final, and Java 6. How do I write a JPA query from the following psuedo-SQL?

What is the difference between enitityManager.find and entityManager.createQuery?

Ok, I was using EJB 3.0 with hibernate, we dropped our .ear file into Easy-Beans 1.0.1 (with Hibernate) deploy directory embedded into Apache Tomcat 6.0.18.

Which one is better : JPA or Hibernate annotation?

I am confused about these two annotation APIs.

Using Min, Max and Count on HQL

Does hibernate HQL queries support using select min, max, count and other sql functions?

Subquery to fetch a property NHibernate

I'm using NHibernate for a web application. I have a model like this:

Hibernate mapping: one column to multiple tables

I have a 'best practice' question for a scenario.

Mapping array with Hibernate

Can you please help me to map th class Hbernate?

Spring & Hibernate: non transactional service methods

I want my read methods not to use a transaction since this is just not needed at all, I only mark my create/update methods with @Transactional. But how do I do this? I have a pretty basic configura...

Batch inserts/updates with hibernate

I am using the class AbstractSimpleGenericDao similar to the form in

How do I override the GenerationType strategy using Hibernate/JPA annotations?

I'm considering using Annotations to define my Hibernate mappings but have run into a problem: I want to use a base entity class to define common fields (including the ID field) but I want different

Legacy database structure Hibernate mapping issue

I am having trouble mapping the following database structure (shortened for brevity with just PKs/FKs and a few extra columns:

Hibernate: updating child object

I have such structure:

HibernateException: Found two representations of same collection

If I save an object containing the following list

Implement an AbstractMultiTenantConnectionProvider

I'm trying to use hibernate multi-tenancy (from chapter 16).

GWT 2.4, GWTP and Hibernate + Maven with Eclipse

I'm trying to make a pom.xml for my project. This project will use GWT 2.4, GWT-Platform and Hibernate.

Using criteria API fetch properties of two objects

Getting Exception while running HQL query using Criteria API

why is org.hibernate.cache.Cache deprecated?

Not only this but also org.hibernate.cache.Cache.CacheProvider is also deprecated.

Retrieve Hibernate Search results directly from Lucene Index

How can I execute a search using Hibernate Search that will NOT retrieve the actual entities from the database and will instead just return the Document cache records for these entities? I am makin...

Hibernate Insert Query in Java

Can anyone tell me how to perform an insert query with Hibernate and back end postgresql

Container managed Transaction for JPA+Spring+Hibernate in Tomcat

I am trying to configure JOTM with JPA,Spring, hibernate and tomcat. I have configured somehow but neither it perform inserts nor updates, in other words, i am unable to perform commits after

Hibernate Exception - could not resolve property:

I am trying to retrieve an object and its children. The request comes up with an exception.

update hibernate configuration file in Netbeans

I want to update my mysql database and alter some tables(add new tables and columns).Is there any way to update the hibernate configuration file and mapping classes and add the entity classes for the

Can not find the tag library descriptor for “”

I am creating an application using Tiles, Spring and Hibernate.

Java hibernate how to use select … where id in ()

I have Account class--account table mapping already.

Java, Hibernate, CascadeTypes and 'garbage collecting' Orphans

What kind of cascade type can I use, and where, to have Hibernate automatically remove the Image when there are no more "Things" referring to it? (so sort of Garbagecollecting in Hibernate, basical...

How to do this hibernate mapping?

I am newbie to hibernate world, so sort of confused in writing mapping file in following condition.

java.sql.SQLException: Login failed for user

I'm trying to configure Hibernate to connect to MS SQL Server 2005 Management Studio Express, but I can't login. I have searched everywhere for a solution, but cant find anything that I can find he...

Getting data through an SSH tunnel using Hibernate

I recently started to learn Hibernate technology and have to get data from a database using Hibernate. The problem is that I can connect to the database only via an SSH tunnel. Are there any proper...

Map ArrayList with Hibernate

I just coded my first Hibernate examples.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.