<?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: Disabling foreign key generation in hbm2ddl</title>
	<atom:link href="http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/</link>
	<description>software engineering for beginners</description>
	<lastBuildDate>Mon, 23 Jan 2012 06:17:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Milan</title>
		<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/comment-page-1/#comment-5432</link>
		<dc:creator>Milan</dc:creator>
		<pubDate>Tue, 06 Sep 2011 12:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/disable-foreign-key-generation-in-hbm2ddl/#comment-5432</guid>
		<description>Thanks a lot for your post. It was helpfull to answer one of my questions (http://stackoverflow.com/questions/7313463/multiple-relationships-with-single-mapping-table-without-generating-foreign-keys/7319977#7319977).

@Skyhan - an xml example is provided in http://blog.xebia.com/2007/02/let-hibernate-connect-your-world/ that is linked from this article, you have to look to the source code of the page as the xml is not shown in the browser

@Skyhan - as seen in https://forum.hibernate.org/viewtopic.php?f=6&amp;t=978321 (and later described in http://stackoverflow.com/questions/7313463/multiple-relationships-with-single-mapping-table-without-generating-foreign-keys/7319977#7319977) you can use following annotation:
@ForeignKey( name = &quot;none&quot; )</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your post. It was helpfull to answer one of my questions (<a href="http://stackoverflow.com/questions/7313463/multiple-relationships-with-single-mapping-table-without-generating-foreign-keys/7319977#7319977" rel="nofollow">http://stackoverflow.com/questions/7313463/multiple-relationships-with-single-mapping-table-without-generating-foreign-keys/7319977#7319977</a>).</p>
<p>@Skyhan &#8211; an xml example is provided in <a href="http://blog.xebia.com/2007/02/let-hibernate-connect-your-world/" rel="nofollow">http://blog.xebia.com/2007/02/let-hibernate-connect-your-world/</a> that is linked from this article, you have to look to the source code of the page as the xml is not shown in the browser</p>
<p>@Skyhan &#8211; as seen in <a href="https://forum.hibernate.org/viewtopic.php?f=6&#038;t=978321" rel="nofollow">https://forum.hibernate.org/viewtopic.php?f=6&#038;t=978321</a> (and later described in <a href="http://stackoverflow.com/questions/7313463/multiple-relationships-with-single-mapping-table-without-generating-foreign-keys/7319977#7319977" rel="nofollow">http://stackoverflow.com/questions/7313463/multiple-relationships-with-single-mapping-table-without-generating-foreign-keys/7319977#7319977</a>) you can use following annotation:<br />
@ForeignKey( name = &#8220;none&#8221; )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Skyhan</title>
		<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/comment-page-1/#comment-5219</link>
		<dc:creator>Skyhan</dc:creator>
		<pubDate>Mon, 25 Apr 2011 05:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/disable-foreign-key-generation-in-hbm2ddl/#comment-5219</guid>
		<description>Is there a complete example showing the full syntax of foreign-key=&quot;none&quot; ? 

An annotation would be even better, but cannot seem to locate a complete example anywhere.</description>
		<content:encoded><![CDATA[<p>Is there a complete example showing the full syntax of foreign-key=&#8221;none&#8221; ? </p>
<p>An annotation would be even better, but cannot seem to locate a complete example anywhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel</title>
		<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/comment-page-1/#comment-1236</link>
		<dc:creator>Michel</dc:creator>
		<pubDate>Thu, 24 Dec 2009 09:56:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/disable-foreign-key-generation-in-hbm2ddl/#comment-1236</guid>
		<description>Cool. thx</description>
		<content:encoded><![CDATA[<p>Cool. thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geir</title>
		<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/comment-page-1/#comment-994</link>
		<dc:creator>Geir</dc:creator>
		<pubDate>Sun, 08 Feb 2009 13:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/disable-foreign-key-generation-in-hbm2ddl/#comment-994</guid>
		<description>&gt;The most logical question now is “why don’t you want an FK?”.

Depends on which database you are using and what you are doing.

If you never actually join across the tables having a foreign key, the key only gives you referential integrity assurance. Referential integrity can be assured in other ways.

Some databases do not cope with foreign keys and composite primary keys nicely. I have seen examples of tables where the index and key spaces were an order of magnitude larger than the data set. This is a major issue if you have nontrivial amounts of data.</description>
		<content:encoded><![CDATA[<p>&gt;The most logical question now is “why don’t you want an FK?”.</p>
<p>Depends on which database you are using and what you are doing.</p>
<p>If you never actually join across the tables having a foreign key, the key only gives you referential integrity assurance. Referential integrity can be assured in other ways.</p>
<p>Some databases do not cope with foreign keys and composite primary keys nicely. I have seen examples of tables where the index and key spaces were an order of magnitude larger than the data set. This is a major issue if you have nontrivial amounts of data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/comment-page-1/#comment-979</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Sat, 17 Jan 2009 21:49:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/disable-foreign-key-generation-in-hbm2ddl/#comment-979</guid>
		<description>Cheers for that - save me heaps of time</description>
		<content:encoded><![CDATA[<p>Cheers for that &#8211; save me heaps of time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://blog.cherouvim.com/disabling-foreign-key-generation-in-hbm2ddl/comment-page-1/#comment-966</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 05 Sep 2008 04:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/disable-foreign-key-generation-in-hbm2ddl/#comment-966</guid>
		<description>Awesome. I need to eliminate foreign keys for my history tables which are mostly duplicates of my regular JPA entities.</description>
		<content:encoded><![CDATA[<p>Awesome. I need to eliminate foreign keys for my history tables which are mostly duplicates of my regular JPA entities.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

