<?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: Java on Rails? Trails: What it is (and isn&#8217;t)</title>
	<atom:link href="http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/feed/" rel="self" type="application/rss+xml" />
	<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/</link>
	<description>Results through imagination</description>
	<lastBuildDate>Mon, 15 Mar 2010 02:56:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ryan</title>
		<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/comment-page-1/#comment-73</link>
		<dc:creator>ryan</dc:creator>
		<pubDate>Wed, 26 Jul 2006 15:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://alterlabs.com/java/java-on-rails-trails-what-it-is-and-isnt/#comment-73</guid>
		<description>Don, I think I mis-spoke - Rails doesn&#039;t auto-wire relationships per-se.  You have to say something like:

&lt;code&gt;has_many :parts&lt;/code&gt;

...similar to the annotation you would use in your examples.  However, you don&#039;t have to tell it what columns to use if you follow the convention (i.e. car_id column in the parts table) thereby avoiding the mappedBy=XXX annotation attribute in Java.</description>
		<content:encoded><![CDATA[<p>Don, I think I mis-spoke &#8211; Rails doesn&#8217;t auto-wire relationships per-se.  You have to say something like:</p>
<p><code>has_many :parts</code></p>
<p>&#8230;similar to the annotation you would use in your examples.  However, you don&#8217;t have to tell it what columns to use if you follow the convention (i.e. car_id column in the parts table) thereby avoiding the mappedBy=XXX annotation attribute in Java.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: don</title>
		<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/comment-page-1/#comment-72</link>
		<dc:creator>don</dc:creator>
		<pubDate>Wed, 26 Jul 2006 13:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://alterlabs.com/java/java-on-rails-trails-what-it-is-and-isnt/#comment-72</guid>
		<description>Ryan/Graeme,

Well with my disclaimer around my general lack of Rails experience in tact; you have it correct. Trails does not autowire relationships based on names. It does however create tables/columns/etc for you and there is a standard naming convention at play there... but it is more one associated with the JPA standards, less Trails.

I have been meaning to more fully investigate Groovy in general, and Grails in particular; so perhaps now is my excuse. Thanks for the tip.

-don</description>
		<content:encoded><![CDATA[<p>Ryan/Graeme,</p>
<p>Well with my disclaimer around my general lack of Rails experience in tact; you have it correct. Trails does not autowire relationships based on names. It does however create tables/columns/etc for you and there is a standard naming convention at play there&#8230; but it is more one associated with the JPA standards, less Trails.</p>
<p>I have been meaning to more fully investigate Groovy in general, and Grails in particular; so perhaps now is my excuse. Thanks for the tip.</p>
<p>-don</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graeme Rocher</title>
		<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/comment-page-1/#comment-71</link>
		<dc:creator>Graeme Rocher</dc:creator>
		<pubDate>Wed, 26 Jul 2006 06:58:23 +0000</pubDate>
		<guid isPermaLink="false">http://alterlabs.com/java/java-on-rails-trails-what-it-is-and-isnt/#comment-71</guid>
		<description>This is exactly what Grails does with GORM (http://grails.org/GORM). We built an ORM mapping strategy built on Hibernate that uses the convention in the classes instead of annotations/XML.</description>
		<content:encoded><![CDATA[<p>This is exactly what Grails does with GORM (<a href="http://grails.org/GORM" rel="nofollow">http://grails.org/GORM</a>). We built an ORM mapping strategy built on Hibernate that uses the convention in the classes instead of annotations/XML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryan</title>
		<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/comment-page-1/#comment-70</link>
		<dc:creator>ryan</dc:creator>
		<pubDate>Wed, 26 Jul 2006 02:00:37 +0000</pubDate>
		<guid isPermaLink="false">http://alterlabs.com/java/java-on-rails-trails-what-it-is-and-isnt/#comment-70</guid>
		<description>Gotcha, so Trails doesn&#039;t auto-wire relationships based on conventional column names (as Rails does) - it&#039;s up to you to define them using JPA demarcations?

I wonder how difficult it would be to take it that step further and build in auto-sensing relationships...</description>
		<content:encoded><![CDATA[<p>Gotcha, so Trails doesn&#8217;t auto-wire relationships based on conventional column names (as Rails does) &#8211; it&#8217;s up to you to define them using JPA demarcations?</p>
<p>I wonder how difficult it would be to take it that step further and build in auto-sensing relationships&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: don</title>
		<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/comment-page-1/#comment-69</link>
		<dc:creator>don</dc:creator>
		<pubDate>Tue, 25 Jul 2006 20:18:28 +0000</pubDate>
		<guid isPermaLink="false">http://alterlabs.com/java/java-on-rails-trails-what-it-is-and-isnt/#comment-69</guid>
		<description>I can try ;)  The  EJB3/JPA syntax uses Java5 annotations to establish the relationships between domain objects. So if want the above defined Car object to have a collection of Part objects (yeah I know its dumb), you might declare an attribute within the Car Object like so:
  private Set&lt;Part&gt; parts = new HashSet&lt;Part&gt;();

..and then establish the One-Car-Has-Many-Parts relationship with an annotation on the accessor for the Parts:

  @OneToMany
  public Set&lt;Part&gt; getParts()

And if you want the Part objects in turn to know about the Car that collects them, you would have establish the ManyToOne relationship within the Part Class; as well as establish the mapping column to be used:
  @OneToMany (mappedBy=&quot;owningCar&quot;)

...there are then a host of other adornments that can be layered on controlling cascading, lazy loading, etc.  Basically, all the stuff that you have to know in order to use Hibernate directly, you need to know with the JPA. Once again, not really Trails problem, but still necessary.</description>
		<content:encoded><![CDATA[<p>I can try ;)  The  EJB3/JPA syntax uses Java5 annotations to establish the relationships between domain objects. So if want the above defined Car object to have a collection of Part objects (yeah I know its dumb), you might declare an attribute within the Car Object like so:<br />
  private Set
<part> parts = new HashSet</part>
<part>();</p>
<p>..and then establish the One-Car-Has-Many-Parts relationship with an annotation on the accessor for the Parts:</p>
<p>  @OneToMany<br />
  public Set</part>
<part> getParts()</p>
<p>And if you want the Part objects in turn to know about the Car that collects them, you would have establish the ManyToOne relationship within the Part Class; as well as establish the mapping column to be used:<br />
  @OneToMany (mappedBy=&#8221;owningCar&#8221;)</p>
<p>&#8230;there are then a host of other adornments that can be layered on controlling cascading, lazy loading, etc.  Basically, all the stuff that you have to know in order to use Hibernate directly, you need to know with the JPA. Once again, not really Trails problem, but still necessary.</part>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryan</title>
		<link>http://alterlabs.com/technologies/java/java-on-rails-trails-what-it-is-and-isnt/comment-page-1/#comment-68</link>
		<dc:creator>ryan</dc:creator>
		<pubDate>Tue, 25 Jul 2006 20:03:29 +0000</pubDate>
		<guid isPermaLink="false">http://alterlabs.com/java/java-on-rails-trails-what-it-is-and-isnt/#comment-68</guid>
		<description>Can you expand upon what is meant by this, &quot;Establishing relationships between Domain Objects requires JPA knowledge&quot;?</description>
		<content:encoded><![CDATA[<p>Can you expand upon what is meant by this, &#8220;Establishing relationships between Domain Objects requires JPA knowledge&#8221;?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
