<?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 : Latest Version Generated Code Bug?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Latest Version Generated Code Bug?</description>
  <pubDate>Sat, 11 Apr 2026 06:09:00 -700</pubDate>
  <lastBuildDate>Thu, 17 Sep 2009 12:49:43 -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=1478</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>Latest Version Generated Code Bug? : As a point of order, the bug with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5408#5408</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1478<br /><strong>Posted:</strong> 17-Sep-2009 at 12:49pm<br /><br />As a point of order, the bug with nullable types may well be a bug, but it is also a bug on our end because the fields are boolean but have not been marked as NOT NULL in the database when they should have been.<br />Thanks kimj, your responses are always quick and helpful.]]>
   </description>
   <pubDate>Thu, 17 Sep 2009 12:49:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5408#5408</guid>
  </item> 
  <item>
   <title>Latest Version Generated Code Bug? : Re the exception - that would...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5407#5407</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1478<br /><strong>Posted:</strong> 17-Sep-2009 at 12:30pm<br /><br />Re the exception - that would be a bug.&nbsp;&nbsp; We do attempt conversion of the DefaultValue when we stuff it into the entity, and&nbsp;Convert.ChangeType is throwing because of the Nullable&lt;Boolean&gt;.&nbsp;&nbsp; For now,&nbsp;DefaultValue won't work with nullable types other than string.&nbsp; We'll add this to the defect list.&nbsp; Thanks for reporting it.]]>
   </description>
   <pubDate>Thu, 17 Sep 2009 12:30:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5407#5407</guid>
  </item> 
  <item>
   <title>Latest Version Generated Code Bug? : Rethe first post - We take whatever...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5405#5405</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1478<br /><strong>Posted:</strong> 17-Sep-2009 at 12:10pm<br /><br /><P>Re&nbsp;the first post - We take whatever is defined in the DefaultValue attribute for the property in the EDMX file, and don't validate its correctness or make it language-specific.&nbsp; So, if you modify the EDMX to use DefaultValue="false" for these properties&nbsp;the code&nbsp;should generate correctly for C#.</P><DIV></DIV>Just saw your second post ...<span style="font-size:10px"><br /><br />Edited by kimj - 17-Sep-2009 at 12:11pm</span>]]>
   </description>
   <pubDate>Thu, 17 Sep 2009 12:10:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5405#5405</guid>
  </item> 
  <item>
   <title>Latest Version Generated Code Bug? : Also, I am getting this error...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5404#5404</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1478<br /><strong>Posted:</strong> 17-Sep-2009 at 11:34am<br /><br />Also, I am getting this error when I try to run the app:<br /><br />Assembly Initialization method GcsAg.DomainModel.Test.AssemblyInitialization.AssemblyInit threw exception. IdeaBlade.EntityModel.EntityServerException:  IdeaBlade.EntityModel.EntityServerException: Error loading entity relations ---&gt;  IdeaBlade.Core.IdeaBladeException: Error loading entity relations ---&gt;  System.InvalidCastException: Invalid cast from 'System.Boolean' to 'System.Nullable`1&#091;&#091;System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#093;&#093;'.. Aborting test execution.<br /><br />System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)<br />System.Boolean.System.IConvertible.ToType(Type type, IFormatProvider provider)<br />System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)<br />IdeaBlade.EntityModel.DataEntityProperty.UpdateDefaultValue()<br />IdeaBlade.EntityModel.DataEntityProperty..ctor(Type entityType, String propertyName, Type dataType, Boolean isNullable, Boolean isPartOfKey, ConcurrencyStrategy concurrencyStrategy, Boolean isAutoIncrementing, VerificationSetterOptions verificationSetterOptions, Boolean isNativeProperty)<br />ctor(String propertyName, Boolean isNullable, Boolean isPartOfKey, ConcurrencyStrategy concurrencyStrategy, Boolean isAutoIncrementing, VerificationSetterOptions verificationSetterOptions, Boolean isNativeProperty)<br />ctor(String propertyName, Boolean isNullable, Boolean isPartOfKey, ConcurrencyStrategy concurrencyStrategy, Boolean isAutoIncrementing, VerificationSetterOptions verificationSetterOptions)<br />GcsAg.DomainModel.Contact..cctor() in C:\_dev\GcsAg090720\GcsAg.DomainModel\GcsAg.DomainModel.ServerModel.Designer.cs: line 16264<br />IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)<br />IdeaBlade.EntityModel.EntityServerProxy.Fetch(SessionBundle bundle, IEntityQuerySurrogate query)<br />IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate pEntityQuery)<br />IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception pException, Boolean pTryToHandle, PersistenceOperation pOperation)<br />IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate pEntityQuery)<br />IdeaBlade.EntityModel.EntityManager.ExecuteFetch(IEntityFinder finder)<br />IdeaBlade.EntityModel.EntityQueryFinder.Execute()<br />IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync)<br />IdeaBlade.EntityModel.EntityManager.ExecuteQuery(IEntityQuery query)<br />GcsAg.DomainModel.DomainModelEntityManager.InitializeCache() in C:\_dev\GcsAg090720\GcsAg.DomainModel\DomainModelEntityManager.cs: line 235<br />GcsAg.DomainModel.DomainModelEntityManager.InitializeEntityManagerOnServer() in C:\_dev\GcsAg090720\GcsAg.DomainModel\DomainModelEntityManager.cs: line 44<br />GcsAg.DomainModel.DomainModelEntityManager.InitializeEntityManager() in C:\_dev\GcsAg090720\GcsAg.DomainModel\DomainModelEntityManager.cs: line 30<br />GcsAg.DomainModel.Test.AssemblyInitialization.AssemblyInit(TestContext context) in C:\_dev\GcsAg090720\GcsAg.DomainModel.Test\AssemblyInitialization.cs: line 17<br />]]>
   </description>
   <pubDate>Thu, 17 Sep 2009 11:34:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5404#5404</guid>
  </item> 
  <item>
   <title>Latest Version Generated Code Bug? : It seems the generated code has...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5403#5403</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1478<br /><strong>Posted:</strong> 17-Sep-2009 at 11:20am<br /><br />It seems the generated code has an invalid setting for the DefaultValue for boolean properties in C#:<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;Bindable(true, BindingDirection.TwoWay)&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;Editable(true)&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;Display(Name="Promoted", AutoGenerateField=true)&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;IbVal.ValidateProperty&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;IbVal.RequiredValueVerifier()&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;IbCore.DBDataType(typeof(Boolean))&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;DefaultValue(False)&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#091;MsSer.DataMember&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;public Boolean Promoted {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get { return PromotedEntityProperty.GetValue(this); }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;global::System.Diagnostics.DebuggerNonUserCode&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set { PromotedEntityProperty.SetValue(this, value); }<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />Notice the upper case False.  A lower case false works fine.  A simple find and replace has fixed it for me.  Am I doing something wrong though?  Is my mapping file wrong somewhere?  Thanks, Simon.]]>
   </description>
   <pubDate>Thu, 17 Sep 2009 11:20:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1478&amp;PID=5403#5403</guid>
  </item> 
 </channel>
</rss>