• collection is not associated with any session

    OK, I'm getting this a lot now, and I don't know what I am doing wrong.   I am fetching a "parent" object with the following joins:     {code}@OneToMany(mappedBy="report",fetch=FetchType.EAGER) @Fetc...
    Profile Photo
    last modified by tnaran
  • Mapping Spatial Oracle type SDO_GEOMETRY to JGeometry

    After a lot of looking around and tons of false starts I've finally hit upon the ability to work with SDO_GEOMETRY Oracle spatial types. I can convert them within the Hibernate EJB3 framework to JGeometry Java types b...
    Profile Photo
    last modified by newacct
  • Mapping XML to Oracle XMLTYPE in IBM Webspshere platform

    Oracle XMLTYPE attribute type can be mapped to a W3C Document type representation. Hibernate's UserType mechanism allows to create vendor specific data types. There are certain points to consider when mapping an objec...
    Profile Photo
    last modified by newacct
  • Custom sequences

    Compatible with Hibernate 3. Written on June, 2005, by Pietro Polsinelli. If you have updated information, please feed this page (not the remarks below) or send me (mailto:ppolsinelli (at) open-lab (dot) com) infos to...
    Profile Photo
    last modified by newacct
  • Proxy Visitor Pattern

    Note: The explanation in the first paragraph is not entirely correct, better read the one in the "Performance" chapter of the reference documentation first. Anyone using Hibernate for any length of time has no doubt r...
    Profile Photo
    last modified by newacct
  • Batching and auto-evicting Criteria results

    First an example usage:     Criteria criteria = getSession().createCriteria(Foo.class);     criteria.add(...);     criteria.setResultTransformer(     &#...
    Profile Photo
    last modified by newacct
  • UserType for a byte[] identifier property

    Almost any Java type may be used as a generated Hibernate identifier. In this example we show how to use a byte array. Java arrays don't override equals() (which is required for Hibernate identifiers) so we must wrap...
    Profile Photo
    last modified by newacct
  • Configure Ehcache as a Second Level Cache

    Overview  Terracotta Ehcache is a popular open source Java cache that can be used as a Hibernate second level cache.  It can be used as a standalone second level cache, or can be configured for clustering t...
    Profile Photo
    last modified by tgautier
  • Hibernate Core Migration Guide : 3.0

    This document describes the changes between Hibernate 2.1 and Hibernate 3.0 that will affect existing applications, and mentions certain new features of Hibernate 3.0 that might be useful to existing applications....
    Profile Photo
    last modified by sebersole
  • Hibernate Core Migration Guide : 3.3

    3.3 is the first release using Maven as the build tool and using the notion of modules.   You may also want to look at the Hibernate Core Migration Guide : 3.2.   Specific migration concerns include: ...
    Profile Photo
    last modified by sebersole
  • Hibernate Core Migration Guide : 3.2

    The main focus in Hibernate 3.2 is JPA support.   You may want to browse the Hibernate Core Migration Guide : 3.1 first.   Changes in this migration guide are classified into: API Changes (affecting appli...
    Profile Photo
    last modified by sebersole
  • Hibernate Core Migration Guide : 3.1

    Hibernate 3.1 is a relatively minor upgrade to Hibernate 3.0 with many new features.  IN other words, we expect it to be a drop-in replacement for Hibernate 3.0. You should be able to upgrade to 3.1 by using the ...
    Profile Photo
    last modified by sebersole
  • Annotation driven equals and hashCode

    Annotation driven equals and hashCodeThe following implementation of equals, hashcode and toString is using the concept of one or more business keys defined by annotations.The annotation @BusinessKey can be applied wi...
    Profile Photo
    last modified by sebersole
  • Root Persistent Class

    Hibernate doesn't require that persistent classes extend a base class. That is not meant to imply that its necessarily a bad thing. You might like to consider defining a base class for your application's persistent cl...
    Profile Photo
    last modified by sebersole
  • Bidirectional one-to-many with an indexed collection

    Hibernate 3 Hibernate 3 allows you to use indexed collections in a bidirectional association without workaround, just use this mapping: Parent <list inverse="false"/> </list> Child <many-to-one in...
    Profile Photo
    last modified by sebersole
  • Mapping a Dynamic Proxy

    This page explains how to load and store instances that are wrapped with a JDK dynamic proxy. First, you need an interface: public interface FooInterface {     public Long getId();     ...
    Profile Photo
    last modified by sebersole
  • Why This Project Is Successful?

    Here's my thoughts upon what we did in terms of development practice that helped make this project so popular so quickly.   rapid release schedule   Regular file releases (even a few days from one version t...
    Profile Photo
    last modified by sebersole
  • Non-transactional data access and the auto-commit mode

    (This is an excerpt of chapter 10 of the book Java Persistence with Hibernate. If you read this, you are probably one of the forum posters who asked the usual FAQs about the auto-commit mode.)   Many DBMSs enable...
    Profile Photo
    last modified by sebersole
  • Session handling with AOP

    The following example uses JBoss AOP to apply a custom interceptor to any Java method, in any runtime environment.   This is a more flexible alternative to a servlet filter (i.e. the Open Session in View pattern)...
    Profile Photo
    last modified by sebersole
  • Hibernate Aware Action

    In a simple web application, where the web tier has direct access to the database, it makes sense to define a persistence-aware superclass for actions that use Hibernate. The superclass should implement logging, excep...
    Profile Photo
    last modified by sebersole