<?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: Howto Keep Version History in a Single Table Using Hibernate</title>
	<atom:link href="http://www.rojotek.com/blog/2007/12/07/howto-keep-version-history-in-a-single-table-using-hibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rojotek.com/blog/2007/12/07/howto-keep-version-history-in-a-single-table-using-hibernate/</link>
	<description>Software Development in Brisbane</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:00:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Ido Ran</title>
		<link>http://www.rojotek.com/blog/2007/12/07/howto-keep-version-history-in-a-single-table-using-hibernate/comment-page-1/#comment-21675</link>
		<dc:creator>Ido Ran</dc:creator>
		<pubDate>Fri, 20 Feb 2009 15:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojotek.com/blog/2007/12/07/howto-keep-version-history-in-a-single-table-using-hibernate/#comment-21675</guid>
		<description>Hi,
I&#039;m looking for the solution of the problem you just describe - save history in the same table.
I&#039;ve also got to the solution you suggest here.
The problem start when you have referenced table, in that case you end up with either of two options (both of them are not good for the solution):
Have two ID columns, one called IID (for Internal ID) which will be the primary key of the table and another one called GID (for Global ID) which will be the same for all records represent the same entity.
The other option is to have a complex primary key build of both the ID (GID in a since) and the version.

No matter which one you pick you end up referencing the first table to a specific version of the entity, not the entity itself. It means that when every you update the referenced entity you will have to go over all the referencing entities and update them so they&#039;ll reflect the updated data.

I&#039;ll be glad to know if you find a good solution for that.

Thank you very much,
Ido.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;m looking for the solution of the problem you just describe &#8211; save history in the same table.<br />
I&#8217;ve also got to the solution you suggest here.<br />
The problem start when you have referenced table, in that case you end up with either of two options (both of them are not good for the solution):<br />
Have two ID columns, one called IID (for Internal ID) which will be the primary key of the table and another one called GID (for Global ID) which will be the same for all records represent the same entity.<br />
The other option is to have a complex primary key build of both the ID (GID in a since) and the version.</p>
<p>No matter which one you pick you end up referencing the first table to a specific version of the entity, not the entity itself. It means that when every you update the referenced entity you will have to go over all the referencing entities and update them so they&#8217;ll reflect the updated data.</p>
<p>I&#8217;ll be glad to know if you find a good solution for that.</p>
<p>Thank you very much,<br />
Ido.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

