0

很抱歉不得不通过这个渠道提交。您网站上的报告问题功能不仅让我提交我的请求。附上错误:

SoftFluent, SoftFluent, we have a problem! An unidentified error has occured

问题: Pivot 脚本生产者崩溃

可复制:是的

用例: 基本用例有 2 个名称相同的实体(概念相同,但分布在不同的命名空间和模式中),但引用了第三个实体。

在扩展 SqlPivotProducer 之后,被引用的表似乎会找到它的约束(1 个 PK 和 2 个 FK),但 2 个 FK 之一将有一个指向空指针的空 ReferenceTable。

重现步骤: 下面有这个模型并尝试生成 Pivot 脚本文件

<cf:project defaultNamespace="Model1" xmlns:cf="http://www.softfluent.com/codefluent/2005/1" xmlns:cfx="http://www.softfluent.com/codefluent/modeler/2008/1" xmlns:cfsps="http://www.softfluent.com/codefluent/producers.sqlpivotscript/2013/1" xmlns:cfps="http://www.softfluent.com/codefluent/producers.sqlserver/2005/1" xmlns:cfspsi="http://www.softfluent.com/codefluent/producers.ixcyssqlpivotscript/2016/1" createDefaultMethodForms="true" createDefaultApplication="false" createDefaultHints="false">
  <cf:import path="Default.Surface.cfp" />
  <cf:entity name="Entity" schema="SchemaA" namespace="Model1.NamespaceA" persistenceName="Entity">
    <cf:property name="EntityId" key="true" />
    <cf:property name="EntityC" typeName="{0}.NamespaceC.EntityC" />
  </cf:entity>
  <cf:entity name="Entity" schema="SchemaB" namespace="Model1.NamespaceB" persistenceName="Entity">
    <cf:property name="EntityId" key="true" />
    <cf:property name="EntityC" typeName="{0}.NamespaceC.EntityC" />
  </cf:entity>
  <cf:entity name="EntityC" namespace="Model1.NamespaceC">
    <cf:property name="EntityCId" key="true" />
  </cf:entity>
  <cf:producer name="SQL Server Pivot Script" typeName="CodeFluent.Producers.SqlServer.SqlPivotScriptProducer, CodeFluent.Producers.SqlServer">
    <cf:configuration targetDirectory="..\Database1" connectionString="Server=127.0.0.1;Database=EntityA;Integrated Security=true;Application Name=Application;" cfx:targetProject="..\Database1\Database1.sqlproj" cfx:targetProjectLayout="Update" />
  </cf:producer>
  <cf:producer enabled="false" name="SQL Server" typeName="CodeFluent.Producers.SqlServer.SqlServerProducer, CodeFluent.Producers.SqlServer">
    <cf:configuration produceViews="true" targetDirectory="..\Database1" connectionString="Server=127.0.0.1;Database=EntityA;Integrated Security=true;Application Name=FedPeche33_Association;" cfx:targetProject="..\Database1\Database1.sqlproj" cfx:targetProjectLayout="Update, DontRemove" produceSchemas="true" />
  </cf:producer>
  <cf:producer enabled="false" name="Asp.Net Identity" typeName="CodeFluent.Producers.SqlServer.IxcysSqlPivotScriptProducer, SqlServerPivotIxcys">
    <cf:configuration targetDirectory="..\Database1" cfx:targetProject="..\Database1\Database1.sqlproj" cfx:targetProjectLayout="Update" connectionString="Server=127.0.0.1;Database=EntityA;Integrated Security=true;Application Name=FedPeche33_Association;" />
  </cf:producer>
</cf:project>

捕获的堆栈跟踪:

System.NullReferenceException was unhandled
Message: An unhandled exception of type 'System.NullReferenceException' occurred in CodeFluent.Producers.SqlServer.dll
Additional information: Object reference not set to an instance of an object.

暂时我会考虑重命名我的实体来解决这个问题。谢谢你的支持

在调试数据透视脚本生成时,我的环境中也出现了这个非阻塞异常:

DateTimeInvalidLocalFormat occurred
Message: Managed Debugging Assistant 'DateTimeInvalidLocalFormat' has detected a problem in 'C:\Program Files (x86)\SoftFluent\CodeFluent\Modeler\CodeFluent.Build4.exe'.
Additional information: A UTC DateTime is being converted to text in a format that is only correct for local times. This can happen when calling DateTime.ToString using the 'z' format specifier, which will include a local time zone offset in the output. In that case, either use the 'Z' format specifier, which designates a UTC time, or use the 'o' format string, which is the recommended way to persist a DateTime in text. This can also occur when passing a DateTime to be serialized by XmlConvert or DataSet. If using XmlConvert.ToString, pass in XmlDateTimeSerializationMode.RoundtripKind to serialize correctly. If using DataSet, set the DateTimeMode on the DataColumn object to DataSetDateTime.Utc. 
4

0 回答 0