<?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: Hibernate never stops surprising me</title>
	<atom:link href="http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/</link>
	<description>Ganesh\</description>
	<lastBuildDate>Wed, 08 Sep 2010 08:45:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kalyan Dasika</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-79967</link>
		<dc:creator>Kalyan Dasika</dc:creator>
		<pubDate>Fri, 03 Sep 2010 19:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-79967</guid>
		<description>We started our model with a similar approach few years back.. (Address as a component) and then realized we started adding entities like Clinic (has Address) and then we also had to support User to have  multiple addresses (moved to new location and as per regulations you keep a list of old address on profile) .. so the Address evolved from a component to an Entity. So a normalized data model would return an Address object ( and not null even if it is undesired) though all the fields are null. If it is a valid condition to be in or not depends on how you handle the use case.</description>
		<content:encoded><![CDATA[<p>We started our model with a similar approach few years back.. (Address as a component) and then realized we started adding entities like Clinic (has Address) and then we also had to support User to have  multiple addresses (moved to new location and as per regulations you keep a list of old address on profile) .. so the Address evolved from a component to an Entity. So a normalized data model would return an Address object ( and not null even if it is undesired) though all the fields are null. If it is a valid condition to be in or not depends on how you handle the use case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Smythe</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-79263</link>
		<dc:creator>Bill Smythe</dc:creator>
		<pubDate>Sat, 28 Aug 2010 19:08:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-79263</guid>
		<description>This references Mr. King&#039;s terminology when responding to users of the application he is partially responsible for.

Terms such as &#039;stupid&#039;, &#039;meaningless&#039;, &#039;nonsense&#039;, etc are quite unprofessional.  This is not a good way to represent what is a very good argument by those in favor of empty obj elements over a null (no obj?).

If it causes users issues and wasted time, then add a switch that allow them to CHOOSE what is returned - the theoretical tirade is not only unprofessional, but immature.  

If Stephen had an issue with this concept and wasted hours trying to figure out why, then there are hundreds if not thousands of other devs who wasted that time also.

This is not a theoretical issue as much as it is a feature desired by users - regardless of how many persons voted for a particular improvement on a site that I hadn&#039;t heard of until now - I use apps that behave in ways I do not expect, and it usually results in wasted time trying to figure out the &#039;logic&#039; that differs from mine - right or wrong.

Gavin, get over it - It is more important that &#039;your&#039; app behaves as expected so developers are not wasting time just to get to an &#039;aha&#039; moment.  Yes, you are probably very brilliant, but that doesn&#039;t make me any money if I do not get expected results from your product.

Thanks Ganesh for hosting this site!  Degrading terms aside, nice theoretical discussion!

Bill</description>
		<content:encoded><![CDATA[<p>This references Mr. King&#8217;s terminology when responding to users of the application he is partially responsible for.</p>
<p>Terms such as &#8217;stupid&#8217;, &#8216;meaningless&#8217;, &#8216;nonsense&#8217;, etc are quite unprofessional.  This is not a good way to represent what is a very good argument by those in favor of empty obj elements over a null (no obj?).</p>
<p>If it causes users issues and wasted time, then add a switch that allow them to CHOOSE what is returned &#8211; the theoretical tirade is not only unprofessional, but immature.  </p>
<p>If Stephen had an issue with this concept and wasted hours trying to figure out why, then there are hundreds if not thousands of other devs who wasted that time also.</p>
<p>This is not a theoretical issue as much as it is a feature desired by users &#8211; regardless of how many persons voted for a particular improvement on a site that I hadn&#8217;t heard of until now &#8211; I use apps that behave in ways I do not expect, and it usually results in wasted time trying to figure out the &#8216;logic&#8217; that differs from mine &#8211; right or wrong.</p>
<p>Gavin, get over it &#8211; It is more important that &#8216;your&#8217; app behaves as expected so developers are not wasting time just to get to an &#8216;aha&#8217; moment.  Yes, you are probably very brilliant, but that doesn&#8217;t make me any money if I do not get expected results from your product.</p>
<p>Thanks Ganesh for hosting this site!  Degrading terms aside, nice theoretical discussion!</p>
<p>Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ghd</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-76729</link>
		<dc:creator>ghd</dc:creator>
		<pubDate>Fri, 30 Jul 2010 05:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-76729</guid>
		<description>Thanks ! wansantg2zxy.</description>
		<content:encoded><![CDATA[<p>Thanks ! wansantg2zxy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: official australia uggs</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-76671</link>
		<dc:creator>official australia uggs</dc:creator>
		<pubDate>Thu, 29 Jul 2010 09:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-76671</guid>
		<description>you are great to post this for us, thanks a lot. you can have a look at the cheap ugg boots.</description>
		<content:encoded><![CDATA[<p>you are great to post this for us, thanks a lot. you can have a look at the cheap ugg boots.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-76580</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Wed, 28 Jul 2010 10:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-76580</guid>
		<description>What about if a component contains an empty collection?

Collections don&#039;t follow the hibernate null semantics, so all the fields in my component are never all null, so it will always exists :(... And I want it to be null also if it contains an empty collection.

Suppose that the Address contains a some collection of logging about he delivered mail at that address.
I think the component address should be null also if this collection is null, not ?...
I also posted a question about this in the forum:
https://forum.hibernate.org/viewtopic.php?f=1&amp;t=1006066</description>
		<content:encoded><![CDATA[<p>What about if a component contains an empty collection?</p>
<p>Collections don&#8217;t follow the hibernate null semantics, so all the fields in my component are never all null, so it will always exists <img src='http://www.gmarwaha.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> &#8230; And I want it to be null also if it contains an empty collection.</p>
<p>Suppose that the Address contains a some collection of logging about he delivered mail at that address.<br />
I think the component address should be null also if this collection is null, not ?&#8230;<br />
I also posted a question about this in the forum:<br />
<a href="https://forum.hibernate.org/viewtopic.php?f=1&amp;t=1006066" rel="nofollow">https://forum.hibernate.org/viewtopic.php?f=1&amp;t=1006066</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daggerrz</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-76076</link>
		<dc:creator>daggerrz</dc:creator>
		<pubDate>Tue, 20 Jul 2010 10:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-76076</guid>
		<description>Hoping to resurrect this interesting thread. We&#039;re having issues similar to Stephen, i.e. binding Wicket input fields to expressions like &quot;customer.address.postalCode&quot;. I agree with Gavin&#039;s points on null semantics and believe that if we _really_ want to always ensure that getAddress returns an address, this should be done in the setter.

One point that Stephen mentioned, and I think got lost, is the fact that Hibernate&#039;s dirty checking flags a soon-to-be-null address component field as dirty. In other words, if the customer instance is loaded with null address, the address accessor (yeah, I guess it has side-effects) initializes a new address instance when rendering the customer&#039;s address (OpenSessionInView) and the customer will be flushed back to the database. The address fields to not change, but auditing status will.

So the question is, wouldn&#039;t it be reasonable for Hibernate to ensure that the address component really has a persistable state change in order to flag it as dirty? IMO, this would not break the null semantics (rather strengthen it) and at the same time solve our and Stephen&#039;s problems. It might have a slight performance impact, but probably only for systems that would rely on this feature.</description>
		<content:encoded><![CDATA[<p>Hoping to resurrect this interesting thread. We&#8217;re having issues similar to Stephen, i.e. binding Wicket input fields to expressions like &#8220;customer.address.postalCode&#8221;. I agree with Gavin&#8217;s points on null semantics and believe that if we _really_ want to always ensure that getAddress returns an address, this should be done in the setter.</p>
<p>One point that Stephen mentioned, and I think got lost, is the fact that Hibernate&#8217;s dirty checking flags a soon-to-be-null address component field as dirty. In other words, if the customer instance is loaded with null address, the address accessor (yeah, I guess it has side-effects) initializes a new address instance when rendering the customer&#8217;s address (OpenSessionInView) and the customer will be flushed back to the database. The address fields to not change, but auditing status will.</p>
<p>So the question is, wouldn&#8217;t it be reasonable for Hibernate to ensure that the address component really has a persistable state change in order to flag it as dirty? IMO, this would not break the null semantics (rather strengthen it) and at the same time solve our and Stephen&#8217;s problems. It might have a slight performance impact, but probably only for systems that would rely on this feature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: official australia uggs</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-75877</link>
		<dc:creator>official australia uggs</dc:creator>
		<pubDate>Sat, 17 Jul 2010 07:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-75877</guid>
		<description>you are great to do this for us, thanks a lot. you can have a look at the [url]http://www.ugg-sale.biz [/url]</description>
		<content:encoded><![CDATA[<p>you are great to do this for us, thanks a lot. you can have a look at the [url]http://www.ugg-sale.biz [/url]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ugg store</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-75079</link>
		<dc:creator>ugg store</dc:creator>
		<pubDate>Fri, 02 Jul 2010 06:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-75079</guid>
		<description>well done,thanks for sharing.</description>
		<content:encoded><![CDATA[<p>well done,thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charly</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-72038</link>
		<dc:creator>charly</dc:creator>
		<pubDate>Wed, 12 May 2010 02:16:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-72038</guid>
		<description>I have one fix: if your framework is unwilling to listen to your needs, stop using it.  Try iBatis.</description>
		<content:encoded><![CDATA[<p>I have one fix: if your framework is unwilling to listen to your needs, stop using it.  Try iBatis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: izle</title>
		<link>http://www.gmarwaha.com/blog/2010/02/28/hibernate-never-stops-surprising-me/comment-page-1/#comment-70769</link>
		<dc:creator>izle</dc:creator>
		<pubDate>Fri, 16 Apr 2010 13:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=141#comment-70769</guid>
		<description>Hibernate already has waaaay too many switches. If I had my time again I would remove features, not add them.</description>
		<content:encoded><![CDATA[<p>Hibernate already has waaaay too many switches. If I had my time again I would remove features, not add them.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
