<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Persistence Manager - HasChanges</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Persistence Manager - HasChanges</description>
  <pubDate>Sun, 12 Apr 2026 21:39:06 -700</pubDate>
  <lastBuildDate>Thu, 12 Jul 2007 16:48:36 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=230</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Persistence Manager - HasChanges : (1) You can get the specific entities...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=230&amp;PID=510#510</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=21" rel="nofollow">IdeaBlade</a><br /><strong>Subject:</strong> 230<br /><strong>Posted:</strong> 12-Jul-2007 at 4:48pm<br /><br /><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN style="mso-list: Ignore">(1)<FONT face="Times New Roman" size=1><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></FONT><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You can get the specific entities by asking for all entities that have a DataRowState of Added, Deleted, or Modified.&nbsp; For example, you can get all Employees with changes with this one line of code.</SPAN></FONT><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><FONT size=2><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face="Times New Roman"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>mEmployees = mPM.GetEntities&lt;</FONT><SPAN style="COLOR: #2b91af">Employee</SPAN><FONT color=#000000>&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face="Times New Roman"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>(</FONT><SPAN style="COLOR: #2b91af">DataRowState</SPAN><FONT color=#000000>.Added | </FONT><SPAN style="COLOR: #2b91af">DataRowState</SPAN><FONT color=#000000>.Deleted | </FONT><SPAN style="COLOR: #2b91af">DataRowState</SPAN><FONT color=#000000>.Modified);</FONT></FONT></FONT></SPAN></FONT><FONT size=2>;</P></FONT></SPAN></FONT><P =Ms&#111;normal style="MARGIN-LEFT: 0.75in; TEXT-INDENT: -0.5in; mso-list: l1 level1 lfo3"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN style="mso-list: Ignore">(2)<FONT face="Times New Roman" size=1><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></FONT><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You can tell which columns have changed by comparing the CurrentVersion of the object with the OriginalVersion.&nbsp; Here is how you can get the Current and Original FirstName of an Employee:</SPAN></FONT></P><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><SPAN style="COLOR: #2b91af">Employee</SPAN><FONT color=#000000> aEmployee = mEmployees&#091;0&#093;;<o:p></o:p></FONT></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: #2b91af">String</SPAN><FONT color=#000000> currentFirstName = (</FONT><SPAN style="COLOR: #2b91af">String</SPAN><FONT color=#000000>)aEmployee&#091;</FONT><SPAN style="COLOR: #a31515">"FirstName"</SPAN><FONT color=#000000>, </FONT><SPAN style="COLOR: #2b91af">DataRowVersion</SPAN><FONT color=#000000>.Current&#093;;<o:p></o:p></FONT></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: #2b91af">String</SPAN><FONT color=#000000> originalFirstName = (</FONT><SPAN style="COLOR: #2b91af">String</SPAN><FONT color=#000000>)aEmployee&#091;</FONT><SPAN style="COLOR: #a31515">"FirstName"</SPAN><FONT color=#000000>, </FONT><SPAN style="COLOR: #2b91af">DataRowVersion</SPAN><FONT color=#000000>.Original&#093;;<o:p></o:p></FONT></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p><FONT color=#000000 size=3>&nbsp;</FONT></o:p></SPAN></P></SPAN></FONT></SPAN></SPAN></o:p></SPAN>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 16:48:36 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=230&amp;PID=510#510</guid>
  </item> 
  <item>
   <title>Persistence Manager - HasChanges : When the PersistenceManager.HasChanges...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=230&amp;PID=509#509</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 230<br /><strong>Posted:</strong> 12-Jul-2007 at 4:46pm<br /><br /><P =Ms&#111;normal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">When the PersistenceManager.HasChanges is true,<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-list: Ignore">1)<FONT face="Times New Roman" size=1><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></FONT><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Can the PM tell me which entities it thinks has changes?<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-list: Ignore">2)<FONT face="Times New Roman" size=1><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></FONT><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">For a specific entity which “HasChanges”, can the PM tell me which columns it thinks has changed?</SPAN></FONT></P>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 16:46:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=230&amp;PID=509#509</guid>
  </item> 
 </channel>
</rss>