Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lior Gabay 1 post 71 karma points
    Sep 20, 2018 @ 13:59
    Lior Gabay
    0

    Generate Models - Failed to build models (Sql Error)

    hey, i'm trying to generate with models builder as i used to do but now i get this failure:

    Last generation failed with the following error:

    Failed to build models. The INSERT statement conflicted with the FOREIGN KEY constraint "FKcmsPropertyTypecmsDataType_nodeId". The conflict occurred in database "BluranOrdersUmbraco", table "dbo.cmsDataType", column 'nodeId'. The statement has been terminated.

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>cDisplayClass110.0() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) at Umbraco.Core.Persistence.Database.Insert(Object poco) at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository1.PersistUpdatedBaseContentType(IContentTypeComposition entity) at Umbraco.Core.Persistence.Repositories.MemberTypeRepository.PersistUpdatedItem(IMemberType entity) at Umbraco.Core.Persistence.Repositories.MemberTypeRepository.<>cDisplayClass190.0(MemberTypeReadOnlyDto x) at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Umbraco.Core.Cache.FullDataSetRepositoryCachePolicy2.GetAllCached(Func2 performGetAll) at Umbraco.Core.Cache.FullDataSetRepositoryCachePolicy2.GetAll(TId[] ids, Func2 performGetAll) at Umbraco.Core.Services.MemberTypeService.GetAll(Int32[] ids) at Umbraco.ModelsBuilder.Umbraco.Application.GetAllTypes() in D:\d\Zbu ModelsBuilder-7\Umbraco.ModelsBuilder\Umbraco\Application.cs:line 58 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.GenerateModels(String modelsDirectory, String bin) in D:\d\Zbu ModelsBuilder-7\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 104 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.BuildModels() in D:\d\Zbu ModelsBuilder-7\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 50

    /////

    any help? thanks!.

Please Sign in or register to post replies

Write your reply to:

Draft