<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BlackBox &#187; gorm</title>
	<atom:link href="http://www.warneronstine.com/tag/gorm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warneronstine.com</link>
	<description>Where technology and art disappear</description>
	<lastBuildDate>Tue, 17 Nov 2009 00:05:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gorm-couchdb grails plugin release 0.3</title>
		<link>http://www.warneronstine.com/2009/11/16/gorm-couchdb-grails-plugin-release-0-3/</link>
		<comments>http://www.warneronstine.com/2009/11/16/gorm-couchdb-grails-plugin-release-0-3/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 22:16:50 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[gorm]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.warneronstine.com/?p=518</guid>
		<description><![CDATA[We actually released this to the Grails plugin repository last week but haven&#8217;t had time to blog about this release. There&#8217;s a lot of good stuff in this release, some bug fixes and some new features.
Before we dive into the new features there is a short how-to on the wiki. To install the plugin you [...]]]></description>
			<content:encoded><![CDATA[<p>We actually released this to the Grails plugin repository last week but haven&#8217;t had time to blog about this release. There&#8217;s a lot of good stuff in this release, some bug fixes and some new features.</p>
<p>Before we dive into the new features there is a short <a href="http://wiki.github.com/coryhacking/gorm-couchdb/how-to-use-gorm-couchdb">how-to</a> on the <a href="http://wiki.github.com/coryhacking/gorm-couchdb/">wiki</a>. To install the plugin you can just do a
<pre><code>grails install-plugin gorm-couchdb</code></pre>
<p> or download from the Grails Web site.</p>
<h2>New Features</h2>
<p>Domain objects now assume that there is a design document with the same name as the <code>@CouchEntity</code> type:</p>
<pre><code>
@CouchEntity
Customer {
    ...
 }
</code></pre>
<p>This will then map to a design document named <em>customer</em>. So a call to <code>Customer.queryView("byName")</code> is the same as <code>Customer.queryView("customer/byName")</code>.</p>
<p>Added <code>count()</code> and <code>list()</code> methods that call the <strong>count</strong> and <strong>list</strong> view of the domain design document. You can optionally specify the view as the first parameter, e.g. <code>Customer.list("byName")</code>.  Also, both methods take the options parameter, so default scaffolding code like the following works:</p>
<pre><code>
def list = {
    params.max = Math.min(params.max ? params.max.toInteger() : 10, 100)
    [tripInstanceList: Trip.list(params), tripInstanceTotal: Trip.count()]
}
</code></pre>
<p>Added dynamic finders support for <code>list</code>, <code>find</code>, and <code>count</code> methods that take the view name from the method.  Instead of calling <code>Customers.list("byName")</code> you can now call <code>Customers.listByName()</code>.  The <code>list</code> and <code>count</code> methods only accept options as parameters, for example <code>Customers.listByName(params)</code>. The dynamic finder methods assume that the keys are passed first and that the last parameter of type Map contains any options, e.g., <code>Customers.findByName("John Smith", "John Doe", params)</code> will query the <em>customers/byName</em> view for keys that equal &#8220;John Smith&#8221; or &#8220;John Doe&#8221;.</p>
<p>The methods <code>findByView()</code> and <code>findByViewAndKeys()</code> were renamed to <code>queryByView()</code> and <code>queryByViewAndKeys()</code> to avoid any potential conflicts.</p>
<p>Added a &#8220;typeFieldName&#8221; parameter to the <code>@CouchEntity</code> annotation that specifies the name of the type field stored in the JSON document (and CouchDB database).</p>
<p>Added automatic type conversion on <strong>list</strong>, <strong>find</strong>, and <strong>query</strong> results if the name is the same as a field of the domain model.  A field like <code>lastUpdated</code> will get returned as a Date object instead of a string that you would have to convert.</p>
<p>Added support for <code>@Transient</code> annotation on transient fields.  This is in addition to the already present GORM &#8220;transient&#8221; support.  This also works on &#8220;read-only&#8221; fields, i.e., bean properties with a getter but no setter.</p>
<p>The plugin now uses <a href="http://code.google.com/p/jcouchdb/">jcouchdb&#8217;s</a> svenson library for JSON generation and parsing.  This gives us a slight performance boost, but more importantly, keeps us inline with future jcouchdb changes and enhancements.</p>
<p>Added a <code>toJSON()</code> method to domain objects that returns a JSON version of the domain object.  Note that this could be very different from the one returned by Groovy&#8217;s JSON as id becomes _id and version becomes _rev along with other changes.</p>
<h2>Bug Fixes</h2>
<ul>
<li>Now correctly read attachment&#8217;s metadata</li>
<li>Now remove the automatically injected <strong>id</strong> and <strong>version</strong> properties, and rewrite the <code>toString()</code> method to use the right fields</li>
<li>Now allow spaces in <strong>id</strong> values for bulk operations</li>
<li>Can now store unicode data in any field (including <strong>id</strong> fields)</li>
</ul>
<h2>What&#8217;s next?</h2>
<p>Right now we think we have a fairly stable plugin that we have started using in actual projects and will be improving this as we run into any issues. For me, the first thing will probably be compound key support, where something like <code>project_myProjectName</code> as the id value of my document instead of a generated value. Above and beyond that, handling object relationships is pretty high up there &#8211; we&#8217;re just trying to figure out the best way to do it.</p>
<p>Our main repository is on <a href="http://github.com/coryhacking/gorm-couchdb">Cory&#8217;s Github</a> since he&#8217;s been doing most of the work at this point and I&#8217;ve shifted into more of a project management role.</p>
<p>For bugs, please submit any issues to the bug tracker on <a href="http://github.com/coryhacking/gorm-couchdb/issues">Github</a>. New feature and release planning will be on <a href="http://www.pivotaltracker.com/projects/31715">PivotalTracker</a>. We haven&#8217;t setup a separate mailing list, but both of us are on the Grails user and dev lists. If you would like to become more involved, contact <a href="http://github.com/coryhacking">either</a> of <a href="http://github.com/warnero">us</a> through the Github system. </p>
<p>Finally, if you are developing a different NoSql Grails plugin we want to talk to you. We want to see if we can coordinate our efforts and if there&#8217;s any common ground we can agree on so that we aren&#8217;t all reinventing the wheel.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;title=Gorm-couchdb%20grails%20plugin%20release%200.3&amp;bodytext=We%20actually%20released%20this%20to%20the%20Grails%20plugin%20repository%20last%20week%20but%20haven%27t%20had%20time%20to%20blog%20about%20this%20release.%20There%27s%20a%20lot%20of%20good%20stuff%20in%20this%20release%2C%20some%20bug%20fixes%20and%20some%20new%20features.%0D%0A%0D%0ABefore%20we%20dive%20into%20the%20new%20features%20there%20is%20a" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;title=Gorm-couchdb%20grails%20plugin%20release%200.3" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;title=Gorm-couchdb%20grails%20plugin%20release%200.3&amp;notes=We%20actually%20released%20this%20to%20the%20Grails%20plugin%20repository%20last%20week%20but%20haven%27t%20had%20time%20to%20blog%20about%20this%20release.%20There%27s%20a%20lot%20of%20good%20stuff%20in%20this%20release%2C%20some%20bug%20fixes%20and%20some%20new%20features.%0D%0A%0D%0ABefore%20we%20dive%20into%20the%20new%20features%20there%20is%20a" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Gorm-couchdb%20grails%20plugin%20release%200.3%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;t=Gorm-couchdb%20grails%20plugin%20release%200.3" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;title=Gorm-couchdb%20grails%20plugin%20release%200.3&amp;annotation=We%20actually%20released%20this%20to%20the%20Grails%20plugin%20repository%20last%20week%20but%20haven%27t%20had%20time%20to%20blog%20about%20this%20release.%20There%27s%20a%20lot%20of%20good%20stuff%20in%20this%20release%2C%20some%20bug%20fixes%20and%20some%20new%20features.%0D%0A%0D%0ABefore%20we%20dive%20into%20the%20new%20features%20there%20is%20a" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F11%2F16%2Fgorm-couchdb-grails-plugin-release-0-3%2F&amp;title=Gorm-couchdb%20grails%20plugin%20release%200.3" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2009/11/16/gorm-couchdb-grails-plugin-release-0-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Here comes gorm-couchdb plugin for grails</title>
		<link>http://www.warneronstine.com/2009/10/21/here-comes-gorm-couchdb-plugin-for-grails/</link>
		<comments>http://www.warneronstine.com/2009/10/21/here-comes-gorm-couchdb-plugin-for-grails/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:17:30 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[gorm]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.warneronstine.com/?p=394</guid>
		<description><![CDATA[Well, crazy or not I actually (somehow) convinced someone to help me out. And boy did he help! I got some of the basics going and then Cory took off with them. He&#8217;s put a lot into this plugin and for that I wanted to publicly thank him.
Now, onto the nitty-gritty. This is an alpha [...]]]></description>
			<content:encoded><![CDATA[<p>Well, crazy or not I actually (somehow) convinced <a href="http://twitter.com/coryhacking">someone</a> to help me out. And boy did he help! I got some of the basics going and then Cory took off with them. He&#8217;s put a lot into this plugin and for that I wanted to publicly thank him.</p>
<p>Now, onto the nitty-gritty. This is an alpha <a href="http://wiki.github.com/coryhacking/gorm-couchdb/release-notes">release</a>, so it&#8217;s still missing some features (mainly object inheritance and any kind of relational mapping right now). Basically what you can do is to create an object and save it in a CouchDB database. We have some configuration options and some other cool things that you can try out like loading/reloading of views in your database.</p>
<p>Here are some of the basics of what you can do with the gorm-couchdb plugin</p>
<ul>
<li>Save a class as a CouchDB document</li>
<li>Specify the type of document you want to save (special field in the database)</li>
<li>Save attachments with a document</li>
<li>Specify a custom id an version field to use for your class/document</li>
<li>Load and reload .js views directly into your database when they change</li>
</ul>
<p>There is a short <a href="http://wiki.github.com/coryhacking/gorm-couchdb/how-to-use-gorm-couchdb">how-to</a> on the <a href="http://wiki.github.com/coryhacking/gorm-couchdb/">wiki</a>. To install it you can just do a
<pre><code>grails install-plugin gorm-couchdb</code></pre>
<p> or download from the Grails Web site.</p>
<p>We&#8217;ve switched the main repo over to <a href="http://github.com/coryhacking/gorm-couchdb">Cory&#8217;s</a> since he&#8217;s been doing most of the work at this point and I&#8217;ve shifted into more of a project management role. I&#8217;ll get to down to some more development of features I really want (like composite keys) in the near future.</p>
<p>For bugs, please use the one on <a href="http://github.com/coryhacking/gorm-couchdb/issues">Github</a>, we will be doing all of our release planning over on <a href="http://www.pivotaltracker.com/projects/31715">PivotalTracker</a>. We haven&#8217;t setup a separate mailing list but both of us are on the grails user and dev lists. If you would like to become more involved contact <a href="http://github.com/coryhacking">either</a> of <a href="http://github.com/warnero">us</a> through the Github system. </p>
<p>Finally, if you are developing a different NoSql grails plugin we want to talk to you. Primarily we want to see if we can coordinate our efforts and if there&#8217;s any common ground we can agree on so that we aren&#8217;t all reinventing the wheel.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;title=Here%20comes%20gorm-couchdb%20plugin%20for%20grails&amp;bodytext=Well%2C%20crazy%20or%20not%20I%20actually%20%28somehow%29%20convinced%20someone%20to%20help%20me%20out.%20And%20boy%20did%20he%20help%21%20I%20got%20some%20of%20the%20basics%20going%20and%20then%20Cory%20took%20off%20with%20them.%20He%27s%20put%20a%20lot%20into%20this%20plugin%20and%20for%20that%20I%20wanted%20to%20publicly%20thank%20him.%0D%0A%0D%0ANow%2C%20onto%20" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;title=Here%20comes%20gorm-couchdb%20plugin%20for%20grails" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;title=Here%20comes%20gorm-couchdb%20plugin%20for%20grails&amp;notes=Well%2C%20crazy%20or%20not%20I%20actually%20%28somehow%29%20convinced%20someone%20to%20help%20me%20out.%20And%20boy%20did%20he%20help%21%20I%20got%20some%20of%20the%20basics%20going%20and%20then%20Cory%20took%20off%20with%20them.%20He%27s%20put%20a%20lot%20into%20this%20plugin%20and%20for%20that%20I%20wanted%20to%20publicly%20thank%20him.%0D%0A%0D%0ANow%2C%20onto%20" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Here%20comes%20gorm-couchdb%20plugin%20for%20grails%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;t=Here%20comes%20gorm-couchdb%20plugin%20for%20grails" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;title=Here%20comes%20gorm-couchdb%20plugin%20for%20grails&amp;annotation=Well%2C%20crazy%20or%20not%20I%20actually%20%28somehow%29%20convinced%20someone%20to%20help%20me%20out.%20And%20boy%20did%20he%20help%21%20I%20got%20some%20of%20the%20basics%20going%20and%20then%20Cory%20took%20off%20with%20them.%20He%27s%20put%20a%20lot%20into%20this%20plugin%20and%20for%20that%20I%20wanted%20to%20publicly%20thank%20him.%0D%0A%0D%0ANow%2C%20onto%20" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F10%2F21%2Fhere-comes-gorm-couchdb-plugin-for-grails%2F&amp;title=Here%20comes%20gorm-couchdb%20plugin%20for%20grails" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2009/10/21/here-comes-gorm-couchdb-plugin-for-grails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
