{"id":28,"date":"2005-09-15T16:26:12","date_gmt":"2005-09-15T15:26:12","guid":{"rendered":"http:\/\/www.epischel.de\/wordpress\/?p=28"},"modified":"2009-10-21T21:49:56","modified_gmt":"2009-10-21T20:49:56","slug":"hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-4","status":"publish","type":"post","link":"https:\/\/www.epischel.de\/wordpress\/2005\/09\/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-4\/","title":{"rendered":"&#8222;Hibernate &#8211; A Developers Notebook&#8220; &#8211; migrating to Hibernate 3.0, Chapter 4"},"content":{"rendered":"<p>In this chapter, we add an Entity called &#8222;Artist&#8220; as well as an entity called &#8222;Comments&#8220;.<\/p>\n<p>Copy both <code>Track.hbm.xml<\/code> and <code>Artist.hbm.xml<\/code> from the examples-distribution and remember to change the DTD-reference if necessary.<br \/>\nWhen using &#8222;<code>ant schema<\/code>&#8222;, SAX complained it couldn&#8217;t find <code>${src.root}\/com\/oreilly\/hh\/hibernate-mapping-2.0.dtd<\/code> for <code>Artist.hbm.xml<\/code>.<br \/>\nThat&#8217;s strange because it didn&#8217;t complain about it in <code>Track.hbm.xml<\/code> before. However, I place the DTD file in <code>${src.root}\/com\/oreilly\/hh<\/code><br \/>\nand the prepare-target now copies <code>*.dtd<\/code> file, too.<\/p>\n<p>The code generation is no problem. I has changed <code>CreateTest.java<\/code> again according to Java-beans coding style.<br \/>\nThe package name in <code>QueryTest.java<\/code> and <code>QueryTest2.java<\/code> needs to be changed again from &#8222;<code>net.sf.hibernate...<\/code>&#8220; to &#8222;<code>org.hibernate...<\/code>&#8220; and everything works.<\/p>\n<p>So that&#8217;s it for chapter 4. <\/p>\n<div class=\"syndication-links\"><\/div>","protected":false},"excerpt":{"rendered":"<p>In this chapter, we add an Entity called &#8222;Artist&#8220; as well as an entity called &#8222;Comments&#8220;. Copy both Track.hbm.xml and Artist.hbm.xml from the examples-distribution and remember to change the DTD-reference if necessary. When using &#8222;ant schema&#8220;, SAX complained it couldn&#8217;t find ${src.root}\/com\/oreilly\/hh\/hibernate-mapping-2.0.dtd for Artist.hbm.xml. That&#8217;s strange because it didn&#8217;t complain about it in Track.hbm.xml before.&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[3],"tags":[23,24,120],"series":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-java","tag-bucher","tag-hibernate","tag-java","kind-"],"kind":false,"_links":{"self":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":2,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":176,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/28\/revisions\/176"}],"wp:attachment":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/tags?post=28"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/series?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}