0

我正在生成一个 sharepoint 2010 bdc 模型 xml 文件以及来自模型 1st LLBLGen 框架/C# .net 3.5 项目的实体和关联的服务类。当我在部署 BDC 解决方案时突然开始收到此错误时,一切都很顺利;

在部署步骤‘添加解决方案’中发生错误 178 错误:不能为每个 ILobSystem 对象创建超过‘500’个 IEntity 对象。

使用当前的实体数量,它一直在正常部署(在修改注册表以扩展超时设置之后)。我在 MSDN 中或通过 google 都找不到对 IEntity 对象限制的任何引用,并尝试以各种方式更改生成的 xml 文件以进行测试。如果我删除一个实体,错误会转移到下一个实体的开头。Visual Studio 构建的解决方案很好,只有关于 datetime 数据类型的警告(显然是已知问题)。

我只定义了 59 个实体。其中一些在继承层次结构中,并且模型中表达了许多 FK 关系。我的模型中有太多实体对我来说没有任何意义。我还有很多想补充的。我在每个实体上都包含 EstimatedInstanceCount="10000" 但这似乎没有任何影响。事实上,我相信这是默认设置。模型文件非常大,但我将包含以下单个实体片段以供参考,以了解正在生成的代码。

<Entity Name="Load" Namespace="SharePoint.DataConnector.VoyagerModel" EstimatedInstanceCount="10000" Version="1.0.0.26">
    <Properties>
        <Property Name="Class" Type="System.String">SharePoint.DataConnector.VoyagerModel.LoadService, VoyagerModel</Property>
    </Properties>
    <Identifiers>
        <Identifier Name="Id" TypeName="System.Int32" />
        <!-- TODO: Change the name of the ID and if needed the TypeName of your identifier. -->
    </Identifiers>
    <Methods>
        <!-- start finder method -->
        <Method Name="ReadList">
        <!-- TODO: Change the name of the method if needed. -->
            <Parameters>
                <Parameter Direction="Return" Name="returnParameter">
                <TypeDescriptor TypeName="System.Collections.Generic.IEnumerable`1[[SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel]]" IsCollection="true" Name="LoadList">
                    <TypeDescriptors>
                    <TypeDescriptor Name="Load" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
                        <TypeDescriptors>
                            <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
                            <!-- TODO: Add TypeDescriptors when you add properties to Load. -->                         
                            <TypeDescriptor Name="OrderId" IsCollection="false" ReadOnly="false" TypeName="System.Int32" />
                            <TypeDescriptor Name="Status" IsCollection="false" ReadOnly="false" TypeName="System.String" />
                            <TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
                        </TypeDescriptors>
                    </TypeDescriptor>
                    </TypeDescriptors>
                </TypeDescriptor>
                </Parameter>
            </Parameters>
            <MethodInstances>
                <MethodInstance Type="Finder" ReturnParameterName="returnParameter" Default="true" Name="ReadList" DefaultDisplayName="Load List">
                <Properties>
                    <Property Name="RootFinder" Type="System.String">x</Property>
                </Properties>
                </MethodInstance>
            </MethodInstances>
        </Method>
        <!-- end finder method -->
        <!-- start specific finder method -->
        <Method Name="ReadItem">
            <Parameters>
                <Parameter Direction="In" Name="id">
                    <TypeDescriptor TypeName="System.Int32" IdentifierName="Id" Name="Id" IsCollection="false" />
                </Parameter>
                    <Parameter Direction="Return" Name="returnParameter">
                    <TypeDescriptor TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel" Name="Load">
                        <TypeDescriptors>
                            <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
                            <!-- TODO: Add TypeDescriptors when you add properties to Load. -->
                            <TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" />
                            <TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" />
                            <TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
                        </TypeDescriptors>
                    </TypeDescriptor>
                </Parameter>
            </Parameters>
            <MethodInstances>
                <MethodInstance Type="SpecificFinder" ReturnParameterName="returnParameter" Default="true" Name="ReadItem" DefaultDisplayName="Read Load" />
            </MethodInstances>
        </Method>
        <Method Name="Create">
            <Parameters>
                <Parameter Name="returnLoad" Direction="Return">
                    <TypeDescriptor Name="ReturnLoad" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
                        <TypeDescriptors>
                            <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
                            <TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" />                      
                            <TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" />                      
                            <TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
                        </TypeDescriptors>
                    </TypeDescriptor>
                </Parameter>
                <Parameter Name="newLoad" Direction="In">
                    <TypeDescriptor Name="NewLoad" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
                        <TypeDescriptors>
                            <TypeDescriptor Name="Id" IdentifierName="Id" IsCollection="false" ReadOnly="false" TypeName="System.Int32" CreatorField="false" />
                            <TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" CreatorField="true" />                      
                            <TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" CreatorField="true" />                      
                            <TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
                        </TypeDescriptors>
                    </TypeDescriptor>
                </Parameter>
            </Parameters>
            <MethodInstances>
                <MethodInstance Name="Create" Type="Creator" ReturnParameterName="returnLoad" ReturnTypeDescriptorPath="ReturnLoad" />
            </MethodInstances>
        </Method>
        <Method Name="Delete">
            <Parameters>
                <Parameter Name="id" Direction="In">
                    <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierEntityName="Load" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" />
                </Parameter>
            </Parameters>
            <MethodInstances>
                <MethodInstance Name="Delete" Type="Deleter" />
            </MethodInstances>
        </Method>
        <Method Name="Update">
            <Parameters>
                <Parameter Name="Load" Direction="In">
                    <TypeDescriptor Name="Load" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
                        <TypeDescriptors>
                            <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
                            <TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" UpdaterField="true" />
                            <TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" UpdaterField="true" />
                            <TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
                        </TypeDescriptors>
                    </TypeDescriptor>
                </Parameter>
            </Parameters>
            <MethodInstances>
                <MethodInstance Name="Update" Type="Updater" />
            </MethodInstances>
        </Method>
        <!-- start related entity methods -->

        <Method Name="LoadToOrders">
            <Parameters>
                    <Parameter Name="id" Direction="In">
                        <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierEntityName="Load" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" ForeignIdentifierAssociationEntityName="Load" ForeignIdentifierAssociationEntityNamespace="SharePoint.DataConnector.VoyagerModel" ForeignIdentifierAssociationName="LoadToOrdersAssociationNavigator" />
                    </Parameter>
                    <Parameter Name="orderList" Direction="Return">
                        <TypeDescriptor Name="OrderList" TypeName="System.Collections.Generic.IEnumerable`1[[SharePoint.DataConnector.VoyagerModel.Order, VoyagerModel]]" IsCollection="true">
                            <TypeDescriptors>
                                <TypeDescriptor Name="Order" TypeName="SharePoint.DataConnector.VoyagerModel.Order, VoyagerModel">
                                    <TypeDescriptors>
                                        <TypeDescriptor Name="Id" IsCollection="false" ReadOnly="true" TypeName="System.Int32" IdentifierEntityName="Order" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" />
                                    </TypeDescriptors>
                                </TypeDescriptor>
                            </TypeDescriptors>
                        </TypeDescriptor>
                    </Parameter>
            </Parameters>
            <MethodInstances>
                    <Association Name="LoadToOrdersAssociationNavigator" Type="AssociationNavigator" ReturnParameterName="orderList" ReturnTypeDescriptorPath="OrderList">
                        <SourceEntity Name="Load" Namespace="SharePoint.DataConnector.VoyagerModel" />
                        <DestinationEntity Name="Order" Namespace="SharePoint.DataConnector.VoyagerModel" />
                    </Association>
            </MethodInstances>
        </Method>

        <Method Name="LoadToDriver">
            <Parameters>
                <Parameter Name="id" Direction="In">
                    <TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierEntityName="Load" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" ForeignIdentifierAssociationEntityName="Load" ForeignIdentifierAssociationEntityNamespace="SharePoint.DataConnector.VoyagerModel" ForeignIdentifierAssociationName="LoadToDriverAssociationNavigator" />
                </Parameter>
                <Parameter Name="driverList" Direction="Return">
                    <TypeDescriptor Name="DriverList" TypeName="System.Collections.Generic.IEnumerable`1[[SharePoint.DataConnector.VoyagerModel.Driver, VoyagerModel]]" IsCollection="true">
                        <TypeDescriptors>
                            <TypeDescriptor Name="Driver" TypeName="SharePoint.DataConnector.VoyagerModel.Driver, VoyagerModel">
                                <TypeDescriptors>
                                    <TypeDescriptor Name="Id" IsCollection="false" ReadOnly="true" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" />
                                </TypeDescriptors>
                            </TypeDescriptor>
                        </TypeDescriptors>
                    </TypeDescriptor>
                </Parameter>
            </Parameters>
            <MethodInstances>
                <Association Name="LoadToDriverAssociationNavigator" Type="AssociationNavigator" ReturnParameterName="driverList" ReturnTypeDescriptorPath="DriverList">
                    <SourceEntity Name="Load" Namespace="SharePoint.DataConnector.VoyagerModel" />
                    <DestinationEntity Name="Driver" Namespace="SharePoint.DataConnector.VoyagerModel" />
                </Association>
            </MethodInstances>
        </Method>
        <!-- end related entity methods -->
    </Methods>

    <AssociationGroups>
        <AssociationGroup Name="DriverToLoadAssociation">
            <AssociationReference AssociationName="LoadToDriverAssociationNavigator" Reverse="true" />
        </AssociationGroup>
    </AssociationGroups>
</Entity>
  • 这是一个误导性的错误信息吗?
  • 我可以尝试对模型进行哪些更改?
  • 是否有任何网站设置会影响这一点?

谢谢你的帮助!

4

2 回答 2

0

好的,显然没有太多人在使用大型企业级 BDC 模型?我很害怕...

我发现我猜是我在 MSDN 中的答案。如果您访问MSDN ,您会发现 LobSystem 限制的详细信息;

  • LobSystemInstances - 每个系统的最大实例数:300
  • 实体 - 每个系统的最大实体数:200
  • 关联 - 每个系统的最大关联:1000

就个人而言,这些听起来都不是问题。我使用的是单个 Lob 实例,我只有 59 个实体。每个平均有 8 个左右的关联。但是我不知道如何计算 Max 关联。关联的每一方都算作一个实例吗?对关联的每个引用是否都添加了引用?

我很想听听对 LobSystem 架构的更深入的了解。

同时,我将把我的模型拆分为单独的模式组并修改我的模板以在 bdc 模型模式文件中创建关联,这些关联完全符合不同的 LobSystem 模型。

如果有人知道为什么这不起作用,请立即阻止我!

于 2011-08-10T16:58:11.903 回答
0

我实际上遇到了与您描述的相同的问题,当时也找不到太多关于它的信息。但是,您提到的 MSDN 文章适用于 SharePoint 2007 和 BDC 模型,而不适用于 Business Connectivity Services。

如果您只有 59 个实体,那么在收回您的解决方案后,LobSystem 很可能没有被完全删除。模型和实体确实会被删除,但 LobSystem 本身仍然存在。您可以从管理中心检查这一点。因此,您执行的每个新部署都会再次将实体添加到系统并提高“实体计数”,从而比预期更快地达到 500 个限制。

尝试手动删除 LobSystem(通过管理中心),这样在部署期间也会创建一个新的 LobSystem。

于 2011-08-17T09:30:51.553 回答