Technical supporthttp://www.ormfoundation.org/forums/30.aspxFor discussing installation and setup, bugs and other technical issues with the NORMA.enCommunityServer 2007.1 (Build: 20917.1142)Re: IComparer.Compare method error.http://www.ormfoundation.org/forums/thread/3456.aspxTue, 05 Nov 2013 13:09:09 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3456mnnoon0http://www.ormfoundation.org/forums/thread/3456.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=30&PostID=3456<p>I noticed in vs2010 orm dbimport &nbsp;it changes the value&nbsp;type to decimal(38,38) by default from an import for ints, money, decimal.&nbsp;&nbsp; Seems like if its a number it just makes this a default type.&nbsp; Is there a way to make it use the exisitng type during a data import?</p><p>&nbsp;Also text gets converted to <font color="#0000ff" size="2" face="Consolas"><font color="#0000ff" size="2" face="Consolas"><font color="#0000ff" size="2" face="Consolas">nvarchar </font></font></font><font color="#808080" size="2" face="Consolas"><font color="#808080" size="2" face="Consolas"><font color="#808080" size="2" face="Consolas">(</font></font></font><font size="2" face="Consolas"><font size="2" face="Consolas">2147483647).&nbsp; I just convert it back.</font></font></p><p><font size="2" face="Consolas">It seems like the primary keys kept their int keys but all the other ints were also converted to decimal(38,38).&nbsp; Doesn&#39;t seem to be a big deal just different.&nbsp; Seems like money fields are easy to change back and forth but time consuming if there are hundreds of tables that are different.</font></p>Re: IComparer.Compare method error.http://www.ormfoundation.org/forums/thread/3455.aspxTue, 05 Nov 2013 02:54:57 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3455mnnoon0http://www.ormfoundation.org/forums/thread/3455.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=30&PostID=3455<p>Hi Matt,&nbsp;</p><p>Thanks&nbsp;for the info.&nbsp; Yes I definitely am interested in&nbsp;testing out an intermediate build.&nbsp; I wished the orm model would say dupe so I&#39;d know which entity or fact was causing the problem (like two red lines instead of just one).&nbsp; I&#39;m trying to build the model after connecting everything up in the tool.&nbsp;&nbsp; Then verifying everything is working by verifying that the data matches correctly especially the primary keys identity&nbsp;and seeds. <a href="http://tinyurl.com/o53msc6">http://tinyurl.com/o53msc6</a></p><p>So I could probably get this thing working in VS2010. Hmmmm&nbsp; I didn&#39;t even consider that. lol&nbsp; I think Microsoft is now constantly in flux with these updates.&nbsp;&nbsp; Everything seems to be devolving into web matrix and these Eclipse like Nuget updates so that probably the cause of the change to the sort algorithm.&nbsp; Hopefully that is not in the options somewhere.</p><p>I would do more testing but I need the process to be dirt simple and I feel bad&nbsp;bothering you if it slows you down during the next build cycle.&nbsp; Can&#39;t wait to get my hands on the next version btw.&nbsp; </p><p>Marc&nbsp;</p><p>&nbsp;</p>Re: IComparer.Compare method error.http://www.ormfoundation.org/forums/thread/3454.aspxTue, 05 Nov 2013 01:07:30 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3454Matthew Curland0http://www.ormfoundation.org/forums/thread/3454.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=30&PostID=3454<p>Hi Marc,</p>
<p>Thanks for the files. I have the issue sorted out locally. This comes from a sort return on lin 2920 in ORMModel\Framework\Shell\SerializationEngine.cs, which tries to get a consistent sort order when two named elements have the same name. The comment says that deferring to a guid compare wreaks havoc on baselined tests (this is true, it makes the files effectively uncomparable). However, to account for this situation the code simply picked an arbitrary value. It looks like VS2012 is using a slightly different sort algorithm that calls back a second time with (y,x) instead of (x,y). Favoring one over the other based on position has worked through three VS versions, but blows up badly here. The fix is easy: just return 0.</p>
<p>Your model does have a ton of duplicate names in it. These will be noted in the next VS release, which flags duplicate readings in the model. I&#39;m not 100% that this is what is causing you to hit this, but there is a pretty good change. I&#39;d suggest scanning the model browser for duplicate fact types to fix and then seeing if you can generate and save the relational model.</p>
<p>I should release the next official NORMA version within the next couple of weeks. If you&#39;re totally blocked on this, let me know and I can get you an intermediate build that fixes the problem.</p>
<p>-Matt</p>Re: IComparer.Compare method error.http://www.ormfoundation.org/forums/thread/3451.aspxMon, 04 Nov 2013 12:48:50 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3451mnnoon0http://www.ormfoundation.org/forums/thread/3451.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=30&PostID=3451<p>I sent an email with more details.&nbsp; But I think the problem has to do with either the underscores for field names like &quot;_Namepart1_Namepart2&quot; or fields that have the same name. Either that or there is some kind of reference where two object reference each other and it turns into infinite loop as the program builds a list of variables.&nbsp; Also the table names start with an &quot;_&quot; underscore which may be illegal or be a special character in the Norma tool.</p><p>&nbsp;Thanks,</p><p>Marc</p>Re: IComparer.Compare method error.http://www.ormfoundation.org/forums/thread/3450.aspxSat, 02 Nov 2013 01:37:54 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3450Matthew Curland0http://www.ormfoundation.org/forums/thread/3450.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=30&PostID=3450<p>Hi Marc,</p>
<p>Could you give a few more details here?&nbsp;I don&#39;t have &#39;sql ER&#39; extensions. I&#39;m guessing you mean the &#39;Map to Relational Model&#39; and &#39;Map to Barker ER Model&#39; extensions have been turned on in the &#39;Extension Manager&#39; dialog.</p>
<ul>
<li>
<div>Did you turn the view&nbsp;extensions&nbsp;on as well (Relational View, Barker ER View)?</div></li>
<li>
<div>Do you have problems with one extension (try both)?</div></li>
<li>
<div>Were you able to turn on the initial extensions and only have issues with the subsequent save?</div></li>
<li>
<div>Can you easily repeat this with your model?</div></li>
<li>
<div>What version of VS and NORMA are you running (look in the Help/About dialog to find the NORMA version)</div></li>
<li>
<div>Did you attach another instance of VS and try to get a callstack?</div></li>
<li>
<div>Is your file in a project with an ORMCustomTool generator, or do you just have it in a solution?</div></li>
<li>
<div>Are you willing to send me a file that does this?</div></li>
<li>
<div>What is the origin of the file (its name suggests and import).</div></li>
<li>
<div>&lt;Be proactive and answer some questions of your own&gt;.</div></li></ul>
<p>I&#39;m sure you&#39;ve seen a legitimate failure and I&#39;d really like to help here, but you haven&#39;t given me enough information to even consider investigating this issue. If you could spend a little more time drilling down your issue for me I&#39;m sure we could get it resolved.</p>
<p>-Matt</p>IComparer.Compare method error.http://www.ormfoundation.org/forums/thread/3449.aspxFri, 01 Nov 2013 21:32:51 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3449mnnoon0http://www.ormfoundation.org/forums/thread/3449.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=30&PostID=3449<p>I have an error IComparer.Compare() method and looking for fixed:</p><p>&nbsp;Occurs after I added sql ER Extensions.</p><p>---------------------------<br />Microsoft Visual Studio<br />---------------------------<br />Cannot save &#39;C:\file\OrmImport.orm&#39;: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: &#39;System.Array+FunctorComparer`1[Microsoft.VisualStudio.Modeling.ModelElement]&#39;.<br />---------------------------<br />OK&nbsp;&nbsp; <br />---------------------------<br /></p>