hibernate

Hibernate Search for multiple tables

There are two tables with no relation defined eg : Bugs and Comments For each bug id there are multiple comments.Suppose I am using a query like select b.bugid,b.bugtitle,c.comment from bugs b , comments c where b.bugid = c.bugid In hibernate search ,is there any method to write text queries for multifield searches ? In case, for...

Postgres + Hibernate + Java UUID

I want to use PostgreSQL's native UUID type with a Java UUID. I am using Hibernate as my JPA provider and ORM. If I try to save it directly, it is just saved as a bytea in Postgres. How can I do this? ...

Hibernate Search for multiple classes

There are two tables with no relation defined eg : Bugs and Comments For each bug id there are multiple comments.Suppose I am using a query like select b.bugid,b.bugtitle,c.comment from bugs b , comments c where b.bugid = c.bugid In hibernate search ,is there any method to write text queries for multifield searches ? In case, for a...

Hibernate: No CurrentSessionContext configured

I keep getting a : HibernateException: No CurrentSessionContext configured! in my code. The only information other searches that returned is that the culprit is: <property name="current_session_context_class">thread</property> in my hibernate.cfg.xml. I do have that in my hibernate.cfg.xml file, and I am running this in Tomc...

Mixing implicit and explicit JOINs

I am having a problem with Hibernate generating invalid SQL. Specifically, mixing and matching implicit and explicit joins. This seems to be an open bug. However, I'm not sure why this is invalid SQL. I have come up with a small toy example that generates the same syntax exception. Schema CREATE TABLE Employee ( employeeID INT, name...

Hibernate 2nd level cache

Hi I've run into some problems with hibernate 2nd level cache. As cache provider I use ehcache. Part of config from persistence.xml <property name="hibernate.cache.use_second_level_cache" value="true"/> <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.EhCacheProvider" /> <property name="hibernate.cache.pr...

HQL: How to sort list of objects on property of mapped composite element

Hi everyone, I have an object with a map of components: <class name="Article" table="articles"> ... <map name="i18nData" table="articles_i18n"> <key column="id" not-null="true"/> <map-key column="language" type="string"/> <composite-element class="Article$ArticleI18nData"> <property name="displayName" type...

Hibernate status

Does anyone know what's going on with Hibernate? For a few days hibernate.org was redirecting to "jboss.org," but for the past 2-3 days it's just showing a jboss.org maintenance screen. I realize Hibernate has always been associated with JBoss, so I'm not asking about that, but I use Hibernate in multiple projects, and I use the online...

Hibernate and no PK

Is it possible to create a table (from a JPA annotated hibernate entity) that does not contain a primary key / Id? (I know this is not a good idea. A table should have a primay key.) ...

JPOX JDO and Castor JDO compared to Hibernate persistence

Do these frameworks (JPOX JDO and Cater JDO) work off similar principles as Hibernate? Do they use configuration data plus a combination of reflection and generics? What are some of the major architectural differences? ...

Implementing Audit Trail- Spring AOP vs.Hibernate Interceptor vs DB Trigger

I found couple of discussion threads on this- but nothing which brought a comparison of all three mechanism under one thread. So here is my question... I need to audit DB changes- insert\updates\deletes to business objects. I can think of three ways to do this 1) DB Triggers 2) Hibernate interceptors 3) Spring AOP (This question i...

If I get a book on Hibernate will that be useful for nHIbernate?

Aside from the language used (Java, C#, etc.), are articles and books for Hibernate equally good for nHibernate? Now that I am learning I want to research but I don't want to waste time on the wrong information. Thank you. I have a very basic CRUD database project for learning if anyone has any all in one article. EDIT: I bought the...

Seam/Hibernate validator listener

Hi, We use a standard SEAM setup here ... complete with the validation system that uses hibernate. Basically what happens is a user enters a value into an html input and seam validates the value they entered using the hibernate validation. Works fine for the most part except here's my problem: We need to record the results of validati...

Hibernate/JPA inheritance issue on weblogic

Im getting a weird error when running my spring2.5.6,jpa(hibernate3.4) webapp in weblogic 10.3 [ERROR] Javassist Enhancement failed: com.xxx.domain.model.Scheme java.lang.NoSuchMethodError: pcGetManagedFieldCount at com.xxx.domain.model.Fund.<clinit>(Fund.java) at sun.misc.Unsafe.ensureClassInitialized(Native Method) ...

EHCache + Hibernate Error: Cached Item Was Locked

I have been trying to figure out this problem for a month or so now, and it has been driving me crazy. Basically I want to keep this from happening: FINEST: Cached item was locked: com.cache.dataobject.Part.parts#0 FINE: select parts0_.mainPart_id as mainPart3_1_, parts0_.id as id1_, parts0_.id as id182_0_, parts0_.mainPart_id as mai...

Using Spring + Hibernate Transactional cache in Tomcat?

It seems that Hibernate transactional cache mode requires the use of a JTA transaction manager. In an app server such as Glassfish, Weblogic, etc, Spring can use the JTA transaction manager. Tomcat does not have a JTA transaction manager. Is there one that people use in this scenario? Or do people just not use transactional cache mod...

org.hibernate.PropertyAccessException

I've set up an automated build using cruisecontrol, junit, canoo webtests, hibernate, spring, mySQL 5 on cent os 5. My cruise control build checks out my code builds, performs unit tests, produces a corbetura report, deploys the build to tomcat 6.0.16 and runs canoo webtests against it. In all other tomcat enviroments that I have drop...

hibernate session problem new

I am using Hibernate in NetBeans. I am using the hibernate util class that comes with the Hibernate plugin for NetBeans to get the current session. That is, I am using the following code to get my current session: this.session = HibernateUtil.getSessionFactory().getCurrentSession(); But when I try to lazy fetch anything it gives fol...

Hibernate using JPA (annotated Entities) and liquibase

liquibase is a perfect alternative to hibernate's hbm2ddl_auto property if you are using xml-mapping. But Im using JPA annotation (hibernate annotations). Is it possible to use liquibase then? ...

How do I write an application that more or less acts as a container?

I am planning an application that must provide services that are very much like those of a JEE container to third party extension code. Basically, what this app does is find a set of work items (currently, the plan is to use Hibernate) and dispatch them to work item consumers. The work item consumers load the item details, invoke third...