Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>If <code>session.connect()</code> is now deprecated, how am I supposed to do that?</p> </blockquote> <p>You have to use <a href="http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/Session.html#doWork%28org.hibernate.jdbc.Work%29" rel="nofollow noreferrer"><code>Session#doWork(Work)</code></a> and the <a href="http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/jdbc/Work.html" rel="nofollow noreferrer"><code>Work</code></a> API, as mentioned in the Javadoc:</p> <blockquote> <p><a href="http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/Session.html#connection()" rel="nofollow noreferrer"><code>connection()</code></a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Deprecated.</strong> (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use <a href="http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/Session.html#doWork(org.hibernate.jdbc.Work)" rel="nofollow noreferrer"><code>doWork(org.hibernate.jdbc.Work)</code></a>; for opening a 'temporary Session' use (TBD).</p> </blockquote> <p>You have some time before Hibernate 4.x but, well, using a deprecated API somehow looks like this:</p> <p><img src="https://i.stack.imgur.com/M2c5H.jpg" alt="alt text">:)</p> <p><strong>Update:</strong> According to <strong><a href="http://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg00133.html" rel="nofollow noreferrer">RE: [hibernate-dev] Connection proxying</a></strong> on the hibernate-dev list, it seems that the initial intention of the deprecation was to discourage the use of <code>Session#connection()</code> because it was/is considered as a "bad" API, but it was supposed to stay at that time. I guess they changed their mind...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload