Ignore:
Timestamp:
Jul 28, 2009, 11:29:51 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1350: Update to Hibernate 3.3.2

Updated documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/appendix/incompatible.xml

    r4920 r5027  
    4343    </para>
    4444  </note>
     45 
     46  <sect1 id="appendix.incompatible.2.13">
     47    <title>BASE 2.13 release</title>
     48
     49    <bridgehead>
     50      Reporters, Raw data, Features and Array design blocks are now proxied
     51    </bridgehead>
     52   
     53    <para>
     54      This was previously not possible due to a Hibernate problem with
     55      stateless sessions. See <ulink
     56      url="http://opensource.atlassian.com/projects/hibernate/browse/HHH-3528"
     57      >http://opensource.atlassian.com/projects/hibernate/browse/HHH-3528</ulink>
     58      for more information about this problem.
     59    </para>
     60   
     61    <para>
     62      This change means that items linking to reporter, raw data, feature or array design
     63      blocks will no longer load the linked items automatically. This is usually
     64      not a problem since the proxies will be initialised if needed. The exception
     65      is when a stateless session was used to create the proxy since the stateless
     66      can't initialise proxies. In BASE, stateless sessions are only used by <classname
     67      docapi="net.sf.based.core">DataQuery</classname> instances, eg. queries that
     68      returns reporter, raw data or features. When this type of query is used and
     69      when linked items are used in a way that causes proxy initialization the linked
     70      item must be explicitely FETCH JOIN-ed by the query. Here is an example:
     71    </para>
     72   
     73    <programlisting language="java"><![CDATA[
     74RawBioAssay rba = ...
     75DataQuery<RawData> rawQuery = rba.getRawData();
     76rawQuery.join(
     77  Hql.leftJoin(null, "reporter", Item.REPORTER.getAlias(), null, true));
     78// NOTE! Last parameter is 'true' to FETCH JOIN the reporter!!
     79...
     80DbControl dc = ...
     81DataResultIterator<RawData> rawData = rawQuery.iterate(dc);
     82while (rawData.hasNext())
     83{
     84  RawData rd = rawData.next();
     85  ReporterData reporter = rd.getReporter();
     86  int reporterId = reporter.getId();
     87  // Always safe since getId() doesn't cause proxy initialization
     88
     89  reporter.getName();
     90  // The above statement will fail in BASE 2.13 if
     91  // the FETCH JOIN is no included
     92  ....
     93}]]>
     94</programlisting>
     95 
     96    <para>
     97      The error message to look out for is:
     98      <code>
     99      org.hibernate.SessionException: proxies cannot be fetched by a stateless session
     100      </code>
     101    </para>
     102
     103  </sect1>
    45104 
    46105  <sect1 id="appendix.incompatible.2.12">
Note: See TracChangeset for help on using the changeset viewer.