Hi again!
There is an issue with updated Npgsql v3.0.1...
But now it's related with refreshing of relational model and tables in DB which have references to itself.
For Example we have table Jobs, that created with next script:
CREATE TABLE public.Job
(
Id bigint NOT NULL DEFAULT new_id() PRIMARY KEY,
TypeFk bigint NOT NULL REFERENCES public.JobType,
ParentJobFk bigint REFERENCES public.Job,
ExecMethod varchar(250),
Arguments text,
Status varchar(50) NOT NULL,
Comment varchar(500),
Created timestamp NOT NULL DEFAULT utcnow(),
Modified timestamp NOT NULL DEFAULT utcnow()
);
As we see table have ParentJobFk field that is foreign key reference to this table itself.
So that is the problem, when I trying to refresh relational model from DB i get error:
Exception message:
-------------------------------
Exception type: EndOfStreamException
LLBLGen Pro version 4.2. Build October 3rd, 2014
-----[Core exception]--------------------
в Npgsql.NpgsqlBuffer.Ensure(Int32 count)
в Npgsql.TypeHandler.Read[T](NpgsqlBuffer buf, Int32 len, FieldDescription fieldDescription)
в Npgsql.TypeHandler.Read[T](DataRowMessage row, Int32 len, FieldDescription fieldDescription)
в Npgsql.TypeHandler`1.ReadValueAsObject(DataRowMessage row, FieldDescription fieldDescription)
в Npgsql.NpgsqlDataReader.GetValue(Int32 ordinal)
в Npgsql.NpgsqlDataReader.GetValues(Object[] values)
в System.Data.ProviderBase.SchemaMapping.LoadDataRow()
в System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
в System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
в System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
в System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
в System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
в System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
в SD.LLBLGen.Pro.DBDrivers.PostgreSql.PostgreSqlCatalogRetriever.RetrieveForeignKeys(DBCatalog catalogMetaData)
в SD.LLBLGen.Pro.DBDrivers.PostgreSql.PostgreSqlCatalogRetriever.<ProduceAdditionalActionsToPerform>b__5(DBCatalog catalog)
в SD.LLBLGen.Pro.DBDriverCore.DBCatalogRetriever.PerformAdditionalActions(String catalogName, DBCatalog catalogMetaData, IEnumerable`1 actionsToPerform)
в SD.LLBLGen.Pro.DBDriverCore.DBCatalogRetriever.RetrieveCatalog(String catalogName, List`1 elementsToRetrieve)
в SD.LLBLGen.Pro.DBDriverCore.DBDriverBase.PopulateCatalogs(Dictionary`2 callBacks, Dictionary`2 elementsToRetrieve)
в SD.LLBLGen.Pro.Gui.Classes.GuiController.ObtainMetaDataFromDatabase(DBDriverBase driverUsed, Dictionary`2 selectedElements)
When i dropped this field i was able to refresh without problems.
Can you help me to resolve this issue?