<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -191,18 +191,22 @@ namespace SubSonic.Repository
                 {
                     //add in SCOPE_INDENTITY so we can pull back the ID
                     query.CommandSql += &quot;; SELECT SCOPE_IDENTITY() as new_id&quot;;
+                }
 
-					ITable table = GetTable();
-					string pkPropName = table.PrimaryKey.Name;
-
-					var prop = item.GetType().GetProperty(pkPropName);
-					if (prop != null &amp;&amp; result != null) {
-						object castedReturnValue = result.ChangeTypeTo(prop.PropertyType);
-						prop.SetValue(item, castedReturnValue, null);
-					}
-				}
                 result = provider.ExecuteScalar(query);
 
+                // repopulate primary key column with newly generated ID
+                if (provider.Client == DataClient.SqlClient) {
+                    ITable table = GetTable();
+                    string pkPropName = table.PrimaryKey.Name;
+
+                    var prop = item.GetType().GetProperty(pkPropName);
+                    if (prop != null &amp;&amp; result != null) {
+                        object castedReturnValue = result.ChangeTypeTo(prop.PropertyType);
+                        prop.SetValue(item, castedReturnValue, null);
+                    }
+                }
+
             }
             return result;
         }</diff>
      <filename>SubSonic.Core/Repository/SubSonicRepository.cs</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>88fd4e47902e370566934a4282063d9f8ea7ae97</id>
    </parent>
  </parents>
  <author>
    <name>johnsheehan</name>
    <email>johnsheehan@gmail.com</email>
  </author>
  <url>http://github.com/subsonic/SubSonic-3.0/commit/4846ff7aab5fb45045f680f486554e7283d15c8f</url>
  <id>4846ff7aab5fb45045f680f486554e7283d15c8f</id>
  <committed-date>2009-07-05T21:04:45-07:00</committed-date>
  <authored-date>2009-07-05T21:04:45-07:00</authored-date>
  <message>fixed my own bug in pk column value setting because I'm dumb (and done for tonight)</message>
  <tree>2310314bcd2b06694c918337860989359feb3039</tree>
  <committer>
    <name>johnsheehan</name>
    <email>johnsheehan@gmail.com</email>
  </committer>
</commit>
