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
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, Action
1 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, TaskCompletionSource
1 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.ContentTypeBaseRepository
1.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.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at Umbraco.Core.Cache.FullDataSetRepositoryCachePolicy2.GetAllCached(Func
2 performGetAll) at Umbraco.Core.Cache.FullDataSetRepositoryCachePolicy2.GetAll(TId[] ids, Func
2 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!.
is working on a reply...