<?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>philosophe &#187; gaelyk</title>
	<atom:link href="http://philosophe.com/tag/gaelyk/feed/" rel="self" type="application/rss+xml" />
	<link>http://philosophe.com</link>
	<description>A thoughtful approach to stuff.</description>
	<lastBuildDate>Sat, 14 May 2011 20:12:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting an entity property as a list with Gaelyk and Google Appengine</title>
		<link>http://philosophe.com/2009/10/setting-an-entity-property-as-a-list-with-gaelyk-and-google-appengine/</link>
		<comments>http://philosophe.com/2009/10/setting-an-entity-property-as-a-list-with-gaelyk-and-google-appengine/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:57:39 +0000</pubDate>
		<dc:creator>Derek Sisson</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[gaelyk]]></category>
		<category><![CDATA[Google Appengine]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://philosophe.com/?p=238</guid>
		<description><![CDATA[As the Gaelyk site says, &#8220;Gaelyk is a lightweight Groovy toolkit for Google App Engine Java.&#8221; Gaelyk makes it easier and Groovier to play with datastore entities, allowing the following syntax for creating and saving Entity: import com.google.appengine.api.datastore.Entity //create the entity Entity student = new Entity("person") //set and populate properties student["name"] = "John Doe" student["grade"] [...]]]></description>
			<content:encoded><![CDATA[<p>As the <a href="http://gaelyk.appspot.com/">Gaelyk</a> site says, &#8220;Gaelyk is a lightweight Groovy toolkit for Google App Engine Java.&#8221;</p>
<p>Gaelyk makes it easier and Groovier to play with datastore entities, allowing the following syntax for creating and saving Entity:</p>
<pre class="snippet">
<code >import com.google.appengine.api.datastore.Entity

//create the entity
Entity student = new Entity("person")

//set and populate properties
student["name"] = "John Doe"
student["grade"] = "8"

student.save()</code>
</pre>
<p>What you can&#8217;t do with this easy syntax is save a property as a list; the following line fails:</p>
<pre class="snippet">
<code >//failed attempt to make the property a list
student["colors"] = ["blue", "green"]</code>
</pre>
<p>Instead, you have reach further down to the Entity class API:</p>
<pre class="snippet">
<code >import com.google.appengine.api.datastore.Entity

//create the entity
Entity student = new Entity("person")

//set and populate properties
student["name"] = "John Doe"
student["grade"] = "8"

//make the property a list first
student.setProperty("colors", [])
student["colors"] = ["blue", "green"]

student.save()</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://philosophe.com/2009/10/setting-an-entity-property-as-a-list-with-gaelyk-and-google-appengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

