<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What&#8217;s wrong with Hibernate, #1</title>
	<atom:link href="http://biotext.org.uk/whats-wrong-with-hibernate-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/</link>
	<description>Not a typewriter</description>
	<lastBuildDate>Sat, 07 Jan 2012 11:30:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Andrew</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-38</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sat, 03 Jan 2009 14:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-38</guid>
		<description>Brandon, perhaps unit-testing wasn&#039;t the right phrase, but I certainly have JUnit tests that bring up the Hibernate session in order to test that it&#039;s working as advertised.

Fortunate really, since it turned out that it wasn&#039;t -- see #2 in this series for one or two examples.</description>
		<content:encoded><![CDATA[<p>Brandon, perhaps unit-testing wasn&#8217;t the right phrase, but I certainly have JUnit tests that bring up the Hibernate session in order to test that it&#8217;s working as advertised.</p>
<p>Fortunate really, since it turned out that it wasn&#8217;t &#8212; see #2 in this series for one or two examples.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-32</link>
		<dc:creator>Brandon</dc:creator>
		<pubDate>Sun, 28 Dec 2008 20:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-32</guid>
		<description>Unit testing? Why are you hitting the database for your unit tests? You shouldreally be mocking out the Hibernate stuff anyway. Consider it an opportunity to write better unit tests. :-)

Brandon</description>
		<content:encoded><![CDATA[<p>Unit testing? Why are you hitting the database for your unit tests? You shouldreally be mocking out the Hibernate stuff anyway. Consider it an opportunity to write better unit tests. :-)</p>
<p>Brandon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-31</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 28 Dec 2008 19:03:14 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-31</guid>
		<description>@Dan
1. HQL - what is wrong? 
2. use annotations.
3. Really? I am not having problems.
4. Usually because the developer modeled in correctly.
5. So? 
6. LOL. too funny.  It is an important part but not the center of the app universe. If it is for you, then you have a major architectural issue.</description>
		<content:encoded><![CDATA[<p>@Dan<br />
1. HQL &#8211; what is wrong?<br />
2. use annotations.<br />
3. Really? I am not having problems.<br />
4. Usually because the developer modeled in correctly.<br />
5. So?<br />
6. LOL. too funny.  It is an important part but not the center of the app universe. If it is for you, then you have a major architectural issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Howard</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-28</link>
		<dc:creator>Dan Howard</dc:creator>
		<pubDate>Sun, 28 Dec 2008 15:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-28</guid>
		<description>Only one? There are many problems with Hibernate.

1 HQL
2 XML
3 Lousy generic support
4 Lousy Performance 
5 Huge distro
6 Hides the database which is the most important part of an app.
etc.
etc.</description>
		<content:encoded><![CDATA[<p>Only one? There are many problems with Hibernate.</p>
<p>1 HQL<br />
2 XML<br />
3 Lousy generic support<br />
4 Lousy Performance<br />
5 Huge distro<br />
6 Hides the database which is the most important part of an app.<br />
etc.<br />
etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: angel.pinazo@tresese.es</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-19</link>
		<dc:creator>angel.pinazo@tresese.es</dc:creator>
		<pubDate>Sat, 27 Dec 2008 13:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-19</guid>
		<description>I&#039;ve been using Hibernate for several years and I really like it. But with the coming of EJB3 and other company&#039;s JPA implementations, I think it could be abandoned in two or three years.

Angel Pinazo
Smart Soft Solutions
www.tresese.es</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using Hibernate for several years and I really like it. But with the coming of EJB3 and other company&#8217;s JPA implementations, I think it could be abandoned in two or three years.</p>
<p>Angel Pinazo<br />
Smart Soft Solutions<br />
<a href="http://www.tresese.es" rel="nofollow">http://www.tresese.es</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-16</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sat, 27 Dec 2008 12:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-16</guid>
		<description>Thanks for the tips regarding the error log. I&#039;ll look into this when I&#039;m back at my office. Perhaps I&#039;ve been spoilt by using Guice a lot recently, which goes out of its way to tell you where you screwed up, and how, and often how to fix it.

But -- do you still get the error log details when you get an NPE from the HQL parser, as mentioned in the next rant and here:

http://forum.hibernate.org/viewtopic.php?p=2401637

I&#039;m sceptical to be honest, but I&#039;ll test it and see.

Regarding the fail-fast or fail-on-use question, I guess this is a subjective issue, but from a unit-testing POV it feels a little bit weird seeing completely unrelated tests fail.</description>
		<content:encoded><![CDATA[<p>Thanks for the tips regarding the error log. I&#8217;ll look into this when I&#8217;m back at my office. Perhaps I&#8217;ve been spoilt by using Guice a lot recently, which goes out of its way to tell you where you screwed up, and how, and often how to fix it.</p>
<p>But &#8212; do you still get the error log details when you get an NPE from the HQL parser, as mentioned in the next rant and here:</p>
<p><a href="http://forum.hibernate.org/viewtopic.php?p=2401637" rel="nofollow">http://forum.hibernate.org/viewtopic.php?p=2401637</a></p>
<p>I&#8217;m sceptical to be honest, but I&#8217;ll test it and see.</p>
<p>Regarding the fail-fast or fail-on-use question, I guess this is a subjective issue, but from a unit-testing POV it feels a little bit weird seeing completely unrelated tests fail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavin</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-14</link>
		<dc:creator>Gavin</dc:creator>
		<pubDate>Sat, 27 Dec 2008 12:20:39 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-14</guid>
		<description>Sounds like *you* swallowed the stack trace, or perhaps did not look far enough down it. I&#039;m sure you&#039;ll find the underlying error a bit further down the stack trace. FYI, exception wrapping is a *good* practice, not a bad practice.</description>
		<content:encoded><![CDATA[<p>Sounds like *you* swallowed the stack trace, or perhaps did not look far enough down it. I&#8217;m sure you&#8217;ll find the underlying error a bit further down the stack trace. FYI, exception wrapping is a *good* practice, not a bad practice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-9</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Sat, 27 Dec 2008 08:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-9</guid>
		<description>The log will have the details since there can be multiple errors which is not easily captured in a stacktrace.</description>
		<content:encoded><![CDATA[<p>The log will have the details since there can be multiple errors which is not easily captured in a stacktrace.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcos Silva Pereira</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-8</link>
		<dc:creator>Marcos Silva Pereira</dc:creator>
		<pubDate>Fri, 26 Dec 2008 21:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-8</guid>
		<description>Maybe Hibernate must provide a configuration to enable/disable checking named queries on initialization. But, actually, I really like this feature (because I get the errors sooner).

Kind Regards</description>
		<content:encoded><![CDATA[<p>Maybe Hibernate must provide a configuration to enable/disable checking named queries on initialization. But, actually, I really like this feature (because I get the errors sooner).</p>
<p>Kind Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stanasic</title>
		<link>http://biotext.org.uk/whats-wrong-with-hibernate-1/comment-page-1/#comment-4</link>
		<dc:creator>stanasic</dc:creator>
		<pubDate>Fri, 26 Dec 2008 20:20:56 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=53#comment-4</guid>
		<description>Andrew, I stumbled across your blog via DZone. From the title of the post(s), I expected something more serious. All your rants, however, seem to be a product of you being too quick to code before reading the documentation.

Hibernate will produce the output of what is wrong with query in its ERROR log. Parsing errors will include the character number where the error occurred. Along with the exception itself, it is always enough to pinpoint the problem.

Somewhat of an issue here, though, is that when using @NamedQuery annotation, entire text of query will be concatenated into one line; making it more difficult to spot the problematic place.

Still, it is very easy to setup a Hibernate Console plug-in in Eclipse, and test all queries interactively, before writing them in your code.

&gt; An error in a query will often cause all your tests to fail. Not just ones that use that query.

I don&#039;t see a problem here. All tests fail because SessionFactory can&#039;t be built for each one of them - because named queries are evaluated during configuration. What kind of behavior would you expect? Isn&#039;t it better for Hibernate to fail-fast in this situation, since you surely won&#039;t be deploying queries with errors in production, would you?</description>
		<content:encoded><![CDATA[<p>Andrew, I stumbled across your blog via DZone. From the title of the post(s), I expected something more serious. All your rants, however, seem to be a product of you being too quick to code before reading the documentation.</p>
<p>Hibernate will produce the output of what is wrong with query in its ERROR log. Parsing errors will include the character number where the error occurred. Along with the exception itself, it is always enough to pinpoint the problem.</p>
<p>Somewhat of an issue here, though, is that when using @NamedQuery annotation, entire text of query will be concatenated into one line; making it more difficult to spot the problematic place.</p>
<p>Still, it is very easy to setup a Hibernate Console plug-in in Eclipse, and test all queries interactively, before writing them in your code.</p>
<p>&gt; An error in a query will often cause all your tests to fail. Not just ones that use that query.</p>
<p>I don&#8217;t see a problem here. All tests fail because SessionFactory can&#8217;t be built for each one of them &#8211; because named queries are evaluated during configuration. What kind of behavior would you expect? Isn&#8217;t it better for Hibernate to fail-fast in this situation, since you surely won&#8217;t be deploying queries with errors in production, would you?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

