<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,29 +16,5 @@ module RTunesU
     has_a :external_feed
     has_n :permissions, :tracks, :shared_objects
     
-    def to_xml(xml_builder = Builder::XmlMarkup.new)
-      if self.external_feed
-        self.to_xml_with_feed(xml_builder)
-      else
-        super
-      end
-    end
-    
-    def to_xml_with_feed(xml_builder)
-      xml_builder.tag!('Name', self.name)
-      xml_builder.tag!('GroupType', self.group_type)
-      xml_builder.tag!('ExternalFeed', self.external_feed.to_xml(xml_builder))
-      
-      edit_store = {
-        &quot;Name&quot; =&gt; self.edits[&quot;Name&quot;],
-        &quot;GroupType&quot; =&gt; self.edits[&quot;GroupType&quot;],
-        &quot;ExternalFeed&quot; =&gt; self.edits[&quot;ExternalFeed&quot;]
-      }
-      
-      xml = self.to_xml(xml_builder)
-      
-      self.edits.merge!(edit_store)
-      return xml
-    end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/rtunesu/entities/group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -75,7 +75,7 @@ module RTunesU
       names.each do |name|
         define_method(name) do
           entity_name = options[:as] || name.to_s.camelize
-          instance_variable_get(&quot;@#{name}&quot;) || instance_variable_set(&quot;@#{name}&quot;, RTunesU::HasAEntityCollectionProxy.new_or_nil(self.source_xml./(entity_name), self, entity_name))
+          edits[entity_name] || RTunesU::HasAEntityCollectionProxy.new_or_nil(self.source_xml./(entity_name), self, entity_name)
         end
         
         unless options[:readonly]</diff>
      <filename>lib/rtunesu/entity.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,29 @@ describe Group do
   it_should_have_many :permissions, :tracks, :shared_objects
   it_should_have_a    :external_feed
   
+  describe &quot;external feed&quot; do
+    it &quot;should return nil if unset&quot; do
+      @entity.external_feed.should be_nil
+    end
+    
+    it &quot;should return feed from XML if present&quot; do
+      id = 2628591672
+      mock_connect!
+      FakeWeb.register_uri(:get,
+                           &quot;https://deimos.apple.com/WebObjects/Core.woa/API/GetUploadURL/example.edu.#{id}?credentials=Administrator%40urn%3Amace%3Aitunesu.com%3Asites%3Aexample.edu&amp;identity=%22Admin%22+%3Cadmin%40example.edu%3E+%28admin%29+%5B0%5D&amp;time=1214619134&amp;signature=121a6cf76c9c5ecda41450d87e3394b9d02c570a5f76b2bd16287f860f068302&amp;type=XMLControlFile&quot;,
+                           :body =&gt; mock_upload_url_for_handle(id))
+      FakeWeb.register_uri(:post, mock_upload_url_for_handle(id), :body =&gt; response_for(@klass, 'show', true))
+      @entity = Group.find(id)
+      @entity.external_feed.should_not be_nil
+      FakeWeb.clean_registry
+    end
+    
+    it &quot;should return a feed if set&quot; do
+      @entity.external_feed = ExternalFeed.new
+      @entity.external_feed.should_not be_nil
+    end
+  end
+  
   describe &quot;access rights&quot; do
     it &quot;should have the correct access rights as constant&quot; do
       Group::ACCESS.should ==  {</diff>
      <filename>spec/entities/group_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>94c31795a9327916effcc0af98616c054f001224</id>
    </parent>
  </parents>
  <author>
    <name>Trek Glowacki</name>
    <email>pietrekg@umich.edu</email>
  </author>
  <url>http://github.com/trek/rtunesu/commit/866853a4f9bde6a23ddc724afa56b27a43386062</url>
  <id>866853a4f9bde6a23ddc724afa56b27a43386062</id>
  <committed-date>2009-11-01T18:35:26-08:00</committed-date>
  <authored-date>2009-11-01T18:35:26-08:00</authored-date>
  <message>HasA Associations read from edits or build object a new (like composed attributes)</message>
  <tree>63163c2b28c6e4a2cf817e5c6542a02397e2faea</tree>
  <committer>
    <name>Trek Glowacki</name>
    <email>pietrekg@umich.edu</email>
  </committer>
</commit>
