Joined: 20-Sep-2012
Since I upgraded to ... from version 3.5 this spring, I keep getting this Designer status when refreshing from the Database:
IsOptional flag of field 'xxx' changed to 'True' for every field that is an Identifying field and is a Nullable field. Arguably maybe not right, but we do use these in lots of legacy tables that can't be changed and aren't allowed too either.
The version we did use before has been downloaded on 3-7-2012 (i cant seem to get the version number from the file or when running the first few screens of the setup wizard).
The version we are using now is 3.5 December 11th, 2012 We are using MS Access (OleDb)
Might it have some relation with the new option ReflectNullabilityOfElementFieldInTargetField or/and the fix: 'When a composite PK and all fields were FK fields, at least one field was optional, it could be all fields were reset when the PK side was optional in the relationship. This has been corrected: when the PK side is marked as optional, it won't reset all the FK fields in the FK side to 'optional' if at least one has its IsOptional property set to true.'?
I can't find another option that turns off this behavior again. This gives me lots of work everytime I refresh from the database.
Thanks, Niels
Joined: 28-Nov-2005
I reproduced it with the latest version doing this:
- Create a table like:
Customer
CustomerId (int, NULL, no pk) Name (varchar[50], NULL, no pk)
- Then I created a LLBLGen project,
- Refresh the catalog
- Map that table to an entity
- Set the IdentifyingFields manually to CustomerId. This will set the IsOptional flag to false.
- Go to mappings and change the IsNullable flag to false, otherwise I get a validation error.
- At project settings set 'Identifying fields dbprimary key constraints' to false, so my IdentifyingFields won't be reset.
- Set the 'ReflectNullabilityOfElementFieldInTargetField' to false. Anyway I think this setting is intended to be used when you want to change the IsOptional and that will trigger the IsNullable sync in the mapping. So it's more for model-first approach.
- Refresh the catalog. The IdentifyingFields are kept as expected. The IsOptional flag for CustomerId is reset to true, so there will be validation errors about that.
I remember that the Designer's refresh process would see the IsOptional discrepancy and it would assume that the flag was set manually and it won't reset it. I have to confirm is that is still the case (so a fix will be needed) or if that is indeed expected.
Joined: 20-Sep-2012
I have reverted back to LLBLGen Pro v3.5 Final (May 31st, 2012) but now the problem also appears in here. I have uninstalled LLBLGen pro and installed the May version after that. I restored a backup of the project file from before the update.
These are the refresh results. It's too much to change by hand... everytime I add a new column in the database and refresh all I get this:
--- Refresh results --- Relational model data refresh results Refresh results Migration of project elements to new catalogs Actions performed on Entities for catalog 'DATA' Entity 'Activiteit' Entity migrated to target 'Default.Activiteit'. IsOptional flag of field 'ActiviteitTypeId' changed to 'True'. IsOptional flag of field 'ComSoortId' changed to 'True'. IsOptional flag of field 'ControleurRelCategorieId' changed to 'True'. IsOptional flag of field 'FiatNaarVolgordeId' changed to 'True'. IsOptional flag of field 'KleurId' changed to 'True'. IsOptional flag of field 'PlanFaseId' changed to 'True'. IsOptional flag of field 'RelatieCategorieGroepId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'UitvoerderRelCategorieId' changed to 'True'. Entity 'Calc' Entity migrated to target 'Default.Calc'. IsOptional flag of field 'AltCalcMomentId' changed to 'True'. Type definition of the target 'Default.Calc.BBR' of field 'Bbr' changed. Type definition of the target 'Default.Calc.BrutoBijdrageSom' of field 'BrutoBijdrageSom' changed. Type definition of the target 'Default.Calc.BrutoInclSom' of field 'BrutoInclSom' changed. Type definition of the target 'Default.Calc.BtwNettoSom' of field 'BtwNettoSom' changed. IsOptional flag of field 'CalcMomentId' changed to 'True'. IsOptional flag of field 'CalcScenarioId' changed to 'True'. IsOptional flag of field 'DrukId' changed to 'True'. Type definition of the target 'Default.Calc.ExtraStukKostenVariabel' of field 'ExtraStukKostenVariabel' changed. IsOptional flag of field 'FormaatId' changed to 'True'. Type definition of the target 'Default.Calc.KostenTotaal' of field 'KostenTotaal' changed. Type definition of the target 'Default.Calc.KostenVariabel' of field 'KostenVariabel' changed. Type definition of the target 'Default.Calc.KostenVast' of field 'KostenVast' changed. Type definition of the target 'Default.Calc.Kostprijs' of field 'Kostprijs' changed. Type definition of the target 'Default.Calc.KostprijsSom' of field 'KostprijsSom' changed. Type definition of the target 'Default.Calc.NettoExclSom' of field 'NettoExclSom' changed. Type definition of the target 'Default.Calc.OUDExtraStukKostenVariabel' of field 'OudextraStukKostenVariabel' changed. Type definition of the target 'Default.Calc.OverigeVoorzieningen' of field 'OverigeVoorzieningen' changed. IsOptional flag of field 'PapiersoortId' changed to 'True'. Type definition of the target 'Default.Calc.PW' of field 'Pw' changed. Type definition of the target 'Default.Calc.RabatSom' of field 'RabatSom' changed. Type definition of the target 'Default.Calc.RoyaltySom' of field 'RoyaltySom' changed. Type definition of the target 'Default.Calc.RoyaltyVoorschot' of field 'RoyaltyVoorschot' changed. IsOptional flag of field 'StaffelId' changed to 'True'. Type definition of the target 'Default.Calc.ToeslagDistributie' of field 'ToeslagDistributie' changed. Type definition of the target 'Default.Calc.ToeslagOverhead' of field 'ToeslagOverhead' changed. Type definition of the target 'Default.Calc.ToeslagPromotie' of field 'ToeslagPromotie' changed. IsOptional flag of field 'VerschijningsvormId' changed to 'True'. Entity 'CalcAfzet' Entity migrated to target 'Default.CalcAfzet'. Type definition of the target 'Default.CalcAfzet.BrutoBijdrage' of field 'BrutoBijdrage' changed. Type definition of the target 'Default.CalcAfzet.BrutoIncl' of field 'BrutoIncl' changed. Type definition of the target 'Default.CalcAfzet.BtwNetto' of field 'BtwNetto' changed. IsOptional flag of field 'CalcId' changed to 'True'. Type definition of the target 'Default.CalcAfzet.Kostprijs' of field 'Kostprijs' changed. Type definition of the target 'Default.CalcAfzet.NettoExcl' of field 'NettoExcl' changed. Type definition of the target 'Default.CalcAfzet.Rabat' of field 'Rabat' changed. Type definition of the target 'Default.CalcAfzet.Royalty' of field 'Royalty' changed. IsOptional flag of field 'VerkoopsoortId' changed to 'True'. Entity 'CalcComponent' Entity migrated to target 'Default.CalcComponent'. IsOptional flag of field 'CalcId' changed to 'True'. IsOptional flag of field 'ComponentId' changed to 'True'. Type definition of the target 'Default.CalcComponent.Waarde' of field 'Waarde' changed. The field 'CalcId' is no longer part of the identifying fields. The field 'ComponentId' is no longer part of the identifying fields. Entity 'CalcMoment' Entity migrated to target 'Default.CalcMoment'. IsOptional flag of field 'CalcMomentId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'CalcOplage' Entity migrated to target 'Default.CalcOplage'. IsOptional flag of field 'CalcId' changed to 'True'. Type definition of the target 'Default.CalcOplage.DrukKosten' of field 'DrukKosten' changed. Type definition of the target 'Default.CalcOplage.ExtraStukKostenVariabel' of field 'ExtraStukKostenVariabel' changed. Type definition of the target 'Default.CalcOplage.KostenTotaal' of field 'KostenTotaal' changed. Type definition of the target 'Default.CalcOplage.KostenVariabel' of field 'KostenVariabel' changed. Type definition of the target 'Default.CalcOplage.KostenVast' of field 'KostenVast' changed. Type definition of the target 'Default.CalcOplage.Kostprijs' of field 'Kostprijs' changed. IsOptional flag of field 'Oplage' changed to 'True'. Entity 'CalcRendementComponent' Entity migrated to target 'Default.CalcRendementComponent'. Type definition of the target 'Default.CalcRendementComponent.Bedrag' of field 'Bedrag' changed. IsOptional flag of field 'CalcId' changed to 'True'. Type definition of the target 'Default.CalcRendementComponent.Percentage' of field 'Percentage' changed. IsOptional flag of field 'RendementComponentId' changed to 'True'. Entity 'Component' Entity migrated to target 'Default.Component'. IsOptional flag of field 'ComponentGroepId' changed to 'True'. IsOptional flag of field 'ComponentTypeId' changed to 'True'. IsOptional flag of field 'GrootboekrekeningId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'ComponentGroep' Entity migrated to target 'Default.ComponentGroep'. IsOptional flag of field 'ComponentHoofdGroepId' changed to 'True'. Entity 'ComponentHoofdGroep' Entity migrated to target 'Default.ComponentHoofdGroep'. Entity 'ComponentType' Entity migrated to target 'Default.ComponentType'. IsOptional flag of field 'ComponentTypeId' changed to 'True'. Entity 'Druk' Entity migrated to target 'Default.Druk'. IsOptional flag of field 'BestmateExportVanafVolgordeId' changed to 'True'. IsOptional flag of field 'CalcMomentId' changed to 'True'. IsOptional flag of field 'CalcScenarioId' changed to 'True'. IsOptional flag of field 'DruksoortId' changed to 'True'. IsOptional flag of field 'FatransactieId' changed to 'True'. IsOptional flag of field 'FaverwerkingId' changed to 'True'. IsOptional flag of field 'FiatScenarioId' changed to 'True'. IsOptional flag of field 'IsbnMeldingVolgordeId' changed to 'True'. IsOptional flag of field 'IsbnVerplichtVolgordeId' changed to 'True'. IsOptional flag of field 'KenmerkScenarioId' changed to 'True'. Type definition of the target 'Default.Druk.KostprijsActueel' of field 'KostprijsActueel' changed. IsOptional flag of field 'LogistiekJournaalVanafVolgordeId' changed to 'True'. Type definition of the target 'Default.Druk.OHWKostenBerekend' of field 'OhwkostenBerekend' changed. Type definition of the target 'Default.Druk.OHWKostenRealisatie' of field 'OhwkostenRealisatie' changed. Type definition of the target 'Default.Druk.OHWSaldo' of field 'Ohwsaldo' changed. IsOptional flag of field 'OplageAfzetControleVolgordeId' changed to 'True'. IsOptional flag of field 'PlanningScenarioId' changed to 'True'. IsOptional flag of field 'ProjectId' changed to 'True'. Type definition of the target 'Default.Druk.PWAfgesproken' of field 'Pwafgesproken' changed. IsOptional flag of field 'PwbijwerkenVanafVolgordeId' changed to 'True'. Type definition of the target 'Default.Druk.PWCommercieel' of field 'Pwcommercieel' changed. Type definition of the target 'Default.Druk.PWDirectie' of field 'Pwdirectie' changed. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'UitgaveId' changed to 'True'. IsOptional flag of field 'VolgordeId' changed to 'True'. IsOptional flag of field 'VvpbijwerkenVanafVolgordeId' changed to 'True'. The field 'UitgaveId' is now part of the identifying fields. Entity 'DrukKenmerk' Entity migrated to target 'Default.DrukKenmerk'. IsOptional flag of field 'DrukId' changed to 'True'. IsOptional flag of field 'KenmerkId' changed to 'True'. IsOptional flag of field 'KenmerkItemId' changed to 'True'. IsOptional flag of field 'RelatieId' changed to 'True'. IsOptional flag of field 'UitvoerderRelatieVerbandId' changed to 'True'. Entity 'Fonds' Entity migrated to target 'Default.Fonds'. IsOptional flag of field 'BrandId' changed to 'True'. IsOptional flag of field 'FondsgroepId' changed to 'True'. IsOptional flag of field 'FondsKlantgroepId' changed to 'True'. IsOptional flag of field 'ManagerRelatieId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'Fondsgroep' Entity migrated to target 'Default.Fondsgroep'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'Formaat' Entity migrated to target 'Default.Formaat'. IsOptional flag of field 'StaffelFormaatId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'Kenmerk' Entity migrated to target 'Default.Kenmerk'. IsOptional flag of field 'ActiviteitId' changed to 'True'. IsOptional flag of field 'CalcComponentId' changed to 'True'. IsOptional flag of field 'CalcVeldId' changed to 'True'. IsOptional flag of field 'CbpodattribuutId' changed to 'True'. IsOptional flag of field 'KenmerkGroepId' changed to 'True'. IsOptional flag of field 'StaffelBenaderwijzeId' changed to 'True'. IsOptional flag of field 'StaffelSoortId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'KenmerkGroep' Entity migrated to target 'Default.KenmerkGroep'. Entity 'KenmerkItem' Entity migrated to target 'Default.KenmerkItem'. IsOptional flag of field 'CbpodattribuutItemId' changed to 'True'. IsOptional flag of field 'KenmerkId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'KenmerkItemStaffel' Entity migrated to target 'Default.KenmerkItemStaffel'. IsOptional flag of field 'KenmerkId' changed to 'True'. IsOptional flag of field 'KenmerkItemId' changed to 'True'. IsOptional flag of field 'RelatieId' changed to 'True'. IsOptional flag of field 'UitvoerderRelatieVerbandId' changed to 'True'. Entity 'Maatwerk.MBContractEindafrekeningFrequentie' Entity migrated to target 'Default.MBContractEindafrekeningFrequentie'. Entity 'Maatwerk.MBContractgebied' Entity migrated to target 'Default.MBContractgebied'. Entity 'Maatwerk.MBContractLicentieType' Entity migrated to target 'Default.MBContractLicentieType'. Entity 'Maatwerk.MBContractOnderdeel' Entity migrated to target 'Default.MBContractOnderdeel'. Entity 'Maatwerk.MBContractStatus' Entity migrated to target 'Default.MBContractStatus'. Entity 'Maatwerk.MBRechtAuteurContract' Entity migrated to target 'Default.MBRechtAuteurContract'. IsOptional flag of field 'ContractgebiedId' changed to 'True'. IsOptional flag of field 'ContractOnderdeelId' changed to 'True'. IsOptional flag of field 'ContractPartijRelatieVerbandId' changed to 'True'. IsOptional flag of field 'ContractStatusId' changed to 'True'. IsOptional flag of field 'LandId' changed to 'True'. IsOptional flag of field 'ProjectId' changed to 'True'. Type definition of the target 'Default.MBRechtAuteurContract.VoorschotBijOntvangstManuscript' of field 'VoorschotBijOntvangstManuscript' changed. Type definition of the target 'Default.MBRechtAuteurContract.VoorschotBijTekenen' of field 'VoorschotBijTekenen' changed. Type definition of the target 'Default.MBRechtAuteurContract.VoorschotBijVerschijnen' of field 'VoorschotBijVerschijnen' changed. Type definition of the target 'Default.MBRechtAuteurContract.VoorschotTotaal' of field 'VoorschotTotaal' changed. Entity 'Maatwerk.MBRechtAuteurContractRol' Entity migrated to target 'Default.MBRechtAuteurContractRol'. IsOptional flag of field 'RechtAuteurContractId' changed to 'True'. IsOptional flag of field 'RelatieRolId' changed to 'True'. IsOptional flag of field 'RelatieVerbandId' changed to 'True'. Entity 'Maatwerk.MBRechtLicentieContract' Entity migrated to target 'Default.MBRechtLicentieContract'. IsOptional flag of field 'ContractEindafrekeningFrequentieId' changed to 'True'. IsOptional flag of field 'ContractgebiedId' changed to 'True'. IsOptional flag of field 'ContractLicentieTypeId' changed to 'True'. IsOptional flag of field 'ContractPartijRelatieVerbandId' changed to 'True'. IsOptional flag of field 'LandId' changed to 'True'. IsOptional flag of field 'ProjectId' changed to 'True'. Type definition of the target 'Default.MBRechtLicentieContract.VoorschotBijTekenen' of field 'VoorschotBijTekenen' changed. Type definition of the target 'Default.MBRechtLicentieContract.VoorschotBijVerschijnen' of field 'VoorschotBijVerschijnen' changed. Type definition of the target 'Default.MBRechtLicentieContract.VoorschotTotaal' of field 'VoorschotTotaal' changed. Entity 'Maatwerk.MBRechtVertalerContract' Entity migrated to target 'Default.MBRechtVertalerContract'. Type definition of the target 'Default.MBRechtVertalerContract.Honorarium' of field 'Honorarium' changed. IsOptional flag of field 'ProjectId' changed to 'True'. Type definition of the target 'Default.MBRechtVertalerContract.TariefPer1000Woorden' of field 'TariefPer1000Woorden' changed. IsOptional flag of field 'VertalerContractSoortId' changed to 'True'. Entity 'Maatwerk.MBRechtVertalerContractPartij' Entity migrated to target 'Default.MBRechtVertalerContractPartij'. IsOptional flag of field 'ContractPartijRelatieVerbandId' changed to 'True'. IsOptional flag of field 'RechtVertalerContractId' changed to 'True'. Entity 'Maatwerk.MBVertalerContractSoort' Entity migrated to target 'Default.MBVertalerContractSoort'. Entity 'Papiersoort' Entity migrated to target 'Default.Papiersoort'. IsOptional flag of field 'PapierFamilieId' changed to 'True'. IsOptional flag of field 'PapierKwaliteitId' changed to 'True'. IsOptional flag of field 'StaffelPapiersoortId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'Project' Entity migrated to target 'Default.Project'. IsOptional flag of field 'OrgReferentieTypeId' changed to 'True'. IsOptional flag of field 'OrgTaalId' changed to 'True'. IsOptional flag of field 'ProjectAanvraagStatusId' changed to 'True'. IsOptional flag of field 'ProjectAanvraagTypeId' changed to 'True'. IsOptional flag of field 'ProjectAanvraagUitgeefStatusId' changed to 'True'. IsOptional flag of field 'StandaardFondsId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'TaalId' changed to 'True'. IsOptional flag of field 'VerkoopgebiedId' changed to 'True'. Entity 'Relatie.Land' Entity migrated to target 'Default.Land'. IsOptional flag of field 'AdresVolgordeId' changed to 'True'. IsOptional flag of field 'LandId' changed to 'True'. Entity 'Relatie.Relatie' Entity migrated to target 'Default.Relatie'. IsOptional flag of field 'AccountManagerRelatieId' changed to 'True'. IsOptional flag of field 'BetalingsconditieId' changed to 'True'. IsOptional flag of field 'BrancheId' changed to 'True'. IsOptional flag of field 'BtwId' changed to 'True'. IsOptional flag of field 'CbklantgroepId' changed to 'True'. IsOptional flag of field 'CbrelatieId' changed to 'True'. IsOptional flag of field 'GeslachtId' changed to 'True'. IsOptional flag of field 'HoofdRelatieId' changed to 'True'. IsOptional flag of field 'ImportUpdateTypeId' changed to 'True'. IsOptional flag of field 'KlantBankId' changed to 'True'. IsOptional flag of field 'KlantgroepTellingId' changed to 'True'. IsOptional flag of field 'KlantSubGrootboekRekeningId' changed to 'True'. IsOptional flag of field 'LeverancierBankId' changed to 'True'. IsOptional flag of field 'LeverancierBetalingsconditieId' changed to 'True'. IsOptional flag of field 'LeverancierSubGrootboekRekeningId' changed to 'True'. IsOptional flag of field 'PredicaatId' changed to 'True'. IsOptional flag of field 'PrimairContactRelatieId' changed to 'True'. IsOptional flag of field 'RelatieEigenaarId' changed to 'True'. IsOptional flag of field 'RelatieFunctieId' changed to 'True'. IsOptional flag of field 'RelatieStatusId' changed to 'True'. IsOptional flag of field 'RelatieWijzigTypeId' changed to 'True'. IsOptional flag of field 'RoyaltyAfrekeningSoortId' changed to 'True'. IsOptional flag of field 'RoyaltyAfrekenPeriodeId' changed to 'True'. IsOptional flag of field 'RoyaltyContactRelatieVerbandId' changed to 'True'. IsOptional flag of field 'StaffelDrukkerijId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'TaalId' changed to 'True'. IsOptional flag of field 'UserId' changed to 'True'. IsOptional flag of field 'ValutaId' changed to 'True'. Entity 'Relatie.RelatieRol' Entity migrated to target 'Default.RelatieRol'. IsOptional flag of field 'RelCategorieId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'TableId' changed to 'True'. Entity 'Relatie.RelatieRolVerband' Entity migrated to target 'Default.RelatieRolVerband'. IsOptional flag of field 'RecordId' changed to 'True'. IsOptional flag of field 'RelatieRolId' changed to 'True'. IsOptional flag of field 'RelatieVerbandId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'Relatie.RelatieRolVerbandRecht' Entity migrated to target 'Default.RelatieRolVerbandRecht'. IsOptional flag of field 'RelatieRolVerbandId' changed to 'True'. Entity 'Relatie.RelatieVerband' Entity migrated to target 'Default.RelatieVerband'. IsOptional flag of field 'KopRelatieId' changed to 'True'. IsOptional flag of field 'RelatieAfdelingId' changed to 'True'. IsOptional flag of field 'RelatieFunctieId' changed to 'True'. IsOptional flag of field 'RelatieMediumId' changed to 'True'. IsOptional flag of field 'RelatieVerbandTypeId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'SubRelatieId' changed to 'True'. Entity 'Relatie.RelatieVerbandAdres' Entity migrated to target 'Default.RelatieVerbandAdres'. IsOptional flag of field 'AdrestypeId' changed to 'True'. IsOptional flag of field 'LandId' changed to 'True'. IsOptional flag of field 'RelatieVerbandAdresKoppelingTypeId' changed to 'True'. IsOptional flag of field 'RelatieVerbandId' changed to 'True'. Entity 'Relatie.RelatieVerbandCategorie' Entity migrated to target 'Default.RelatieVerbandCategorie'. IsOptional flag of field 'RelatieVerbandId' changed to 'True'. IsOptional flag of field 'RelCategorieId' changed to 'True'. Entity 'Relatie.RelatieVerbandType' Entity migrated to target 'Default.RelatieVerbandType'. IsOptional flag of field 'RelCategorieId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. Entity 'Relatie.RelCategorie' Entity migrated to target 'Default.RelCategorie'. IsOptional flag of field 'RelCategorieGroepId' changed to 'True'. IsOptional flag of field 'RelCategorieSysteemId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'TreeCustomNodeId' changed to 'True'. Entity 'Relatie.RelCategorieGroep' Entity migrated to target 'Default.RelCategorieGroep'. Entity 'RendementComponent' Entity migrated to target 'Default.RendementComponent'. Entity 'Title' Entity migrated to target 'Default.Title'. IsOptional flag of field 'TableId' changed to 'True'. IsOptional flag of field 'TitleTypeId' changed to 'True'. Entity 'Uitgave' Entity migrated to target 'Default.Uitgave'. Type definition of the target 'Default.Uitgave.AfschrijvingGrondslagPrijs' of field 'AfschrijvingGrondslagPrijs' changed. IsOptional flag of field 'CalcRoyaltyContractScenarioId' changed to 'True'. IsOptional flag of field 'CbvrijgaveStatusId' changed to 'True'. IsOptional flag of field 'FondsId' changed to 'True'. IsOptional flag of field 'GebaseerdOpUitgaveId' changed to 'True'. IsOptional flag of field 'MagazijnAfschrijvingMethodeId' changed to 'True'. IsOptional flag of field 'MagazijnVerwerkingStatusId' changed to 'True'. IsOptional flag of field 'NurId' changed to 'True'. IsOptional flag of field 'OmzetDrukId' changed to 'True'. IsOptional flag of field 'OrderDrukId' changed to 'True'. IsOptional flag of field 'PmcId' changed to 'True'. IsOptional flag of field 'ProjectId' changed to 'True'. Type definition of the target 'Default.Uitgave.PWActueel' of field 'Pwactueel' changed. IsOptional flag of field 'SerieId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'UitgaveSamenstellingTypeId' changed to 'True'. IsOptional flag of field 'UitgaveStatusId' changed to 'True'. IsOptional flag of field 'VerkoopKortingSoortId' changed to 'True'. IsOptional flag of field 'VerschijningsvormId' changed to 'True'. IsOptional flag of field 'VervangtUitgaveId' changed to 'True'. Type definition of the target 'Default.Uitgave.VVPActueel' of field 'Vvpactueel' changed. Entity 'Verkoopsoort' Entity migrated to target 'Default.Verkoopsoort'. IsOptional flag of field 'BtwTypeId' changed to 'True'. IsOptional flag of field 'CbverkoopOmzetSoortId' changed to 'True'. Type definition of the target 'Default.Verkoopsoort.StandaardNettoprijs' of field 'StandaardNettoprijs' changed. IsOptional flag of field 'StandaardTransactieVoorwaardeCategorieId' changed to 'True'. Entity 'Verschijningsvorm' Entity migrated to target 'Default.Verschijningsvorm'. IsOptional flag of field 'IsbncheckProgId' changed to 'True'. IsOptional flag of field 'IsbnidentifierTypeId' changed to 'True'. IsOptional flag of field 'StaffelVerschijningsvormId' changed to 'True'. IsOptional flag of field 'StatusId' changed to 'True'. IsOptional flag of field 'VasteVerkoopKortingSoortId' changed to 'True'. The primary key fields changed in the new target. The primary key fields changed in the new target. One or more unique constraints in the target table 'Default.Druk' were changed/added/removed compared to the original target. Post-migration actions performed on entity model and other project elements Migration of relationships and unique constraints --- End of Refresh results ---
Joined: 17-Aug-2003
We'll look into it. It might not be present in the current codebase, but it doesn't seem right that if you have the setting to sync pk fields switched off, you'll get nullable field flags reset. It's a clear case of 'don't change it at refresh', as there's no ambiguity. So if it's not present in the current codebase, we'll add it and it will be available in the next build of v3.5. Stay tuned.
Joined: 17-Aug-2003
The sync pk setting should be off in your case, otherwise it will set the fields which are mapped onto PK fields in the DB as PK fields, clearing the fields you set manually as pk fields.
It will be tomorrow before we have a fix for you.
Joined: 17-Aug-2003
There's currently logic in place which does what you want, but only for views as target, not tables. It will raise a warning for every PK field which is mapped onto a nullable view field. It will raise an error when the pk field is mapped onto a nullable table field.
The main reason for this difference is that with views it's not always possible to determine field nullability (nor does a view have the concept of a pk).
Your issue is solved if we lower the error for tables to a warning (as with views you could run into a problem at runtime when a null is fetched from the DB) though that would also mean people who do stupid things like accidentally map a pk field onto a nullable field won't get an error.
As v4 is released within a few months, we'll make the change from error -> warning in v3.5 and will add a setting to enable this in v4 (so it's disabled by default in v4, you'll get errors instead of warnings)
Though do realize that if the pk column in the DB contains nulls, you WILL run into problems sooner or later. I'll post in this thread when the release is available.
Joined: 20-Sep-2012
Hello Frans,
I've installed the latest version (januari 17th, 2013).
I am sure inexperienced with your product, but please tell me what to do. I couldn't find a setting called "sync pk fields' but could find somewhat similar settings. Tried them all but still getting the same. I get more problems now, has to do with scale of field, see error list underneath. Please please help.
The settings are in the attachment.
Different errors (list shortened):
Message type: Error Message text: The field 'Relatie.RelatieVerbandCategorie.RelatieVerbandId (FK)' has the following errors: ** - IsOptional: A field which is part of the identifying fields can't be optional** Source: Relatie.RelatieVerbandCategorie.RelatieVerbandId (FK) Created on: zaterdag 26 januari 2013 20:43 Corrections/suggestions Choice 1: Open containing element 'Relatie.RelatieVerbandCategorie' in its editor and manually correct the errors. Choice 2: Remove field 'RelatieVerbandId (FK)' from containing element 'Relatie.RelatieVerbandCategorie'.
AND
Message type: Error Message text: The mapping of sub-element 'BrutoInclSom' of entity 'Calc' for the target database with the driver 'MS Access 2000/XP/2003/2007/2010 Driver (OleDb)' has the following errors: ** - MappedTarget: The scale '2' of the target field 'Default.Calc.BrutoInclSom' is less than the scale '4' set for the mapped field 'BrutoInclSom'** Source: Calc mapping Created on: zaterdag 26 januari 2013 20:43 Corrections/suggestions Choice 1: Open containing element 'Calc' in its editor and manually correct the errors.
Filename | File size | Added on | Approval |
---|---|---|---|
llblgen35_130117_settings.PNG | 41,930 | 26-Jan-2013 20:51.25 | Approved |
Joined: 28-Nov-2005
Puser wrote:
I am sure inexperienced with your product, but please tell me what to do. I couldn't find a setting called "sync pk fields' but could find somewhat similar settings. Tried them all but still getting the same. I get more problems now, has to do with scale of field, see error list underneath. Please please help.
For "sync pk" we meant: 'Identifying fields dbprimary key constraints'. That should be set to "false".
As the PK was synced, the IsOptional was set back to 'true'. Please set that setting. Also you are using "Preferences" and not "Project Settings". Preferences are useful if you are going to take that approach to all your LLBLGen projects. If you just want to do it to this project it's recommended to do that at "Project Settings". Also remember that "Project Settings" overwrites the "Preferences" if they are not set to "Default". So double check that.
For more info see Project Settings and Designer Preferences.
I tested the same thing as my previous post and now it works like expected: A warning is raised, but the IsOptional field is kept.
As for the Scale error, nothing was added in this release for that, so maybe the scale changed in your DB. check the "Length precision scale follow db length precision scale" setting, then fix it doing another refresh or changing the scale in your model.
Joined: 17-Aug-2003
Additionally, I do wonder, you can't change the database, yet you need to refresh the catalog. This doesn't make sense because when you can't change the db, the db doesn't change so there's no need to refresh anything, or am I missing something?
Joined: 20-Sep-2012
Still the same problem. But let me emphasize that the problem occurs at the foreign key side of the ID, not at the primary key side (so not in the table where it is unique). I would expect that there is a 'sync fk' setting then to have the same behaviour as the may 2012 version.
The problem with the scale disappeared when unchecking the setting. As a side note: I used to have all project settings as Default so I thought setting preferences was the way to go and so I displayed these to you. I might reconsider that in the future. But even setting these in the project itself does not change things, as would be expected.
@Frans: I do have 10+ customers with their own database, although I keep the structure in sync with the version of the program they use with my own framework. I have one master development database in which I can add columns and in rare occassions I change them (mostly not, and I don't delete columns at all). There are 700+ different tables and 6800+ columns. Most are stable and in use (partly, for each customer has it's own set of product modules they use). So althought I might add 1 column, I have to refresh the whole catalog, which wouldn't be a problem if it would only detect that 1 change.
Joined: 20-Sep-2012
The first time I used LLBLGen it shouted that for all combined primary keys I have which consist of foreign keys all fields have to be IsOptional=False. (I can imagine why) But the Access database has these fields setting to be optional=true, although practically they are always set, of course. In this first run I have set all above fields IsOptional to False by hand. Then I also had to set IsNullable to false in the table field editor of the Fieldmappings, because they where also al set to True.
See the attachment for my actions on refreshing.
Thanks. Niels
Filename | File size | Added on | Approval |
---|---|---|---|
LLBLGen IsOptional problem 2013 january.docx | 142,054 | 30-Jan-2013 23:04.19 | Approved |
Joined: 28-Nov-2005
Hi Niels,
I can't reproduce what you are saying: I have a Order table that has a relation (at DB) to a Supplier table. The Order.SupplierId field is Nullable at DB, at LLBLGen I changed the IsOptional flag to false (un-check it), then I did a Refresh, the IsOptional flag is kept.
So please describe better your scenario, ideally make a tiny DDL script (just the schema of that two tables) and your .llblgenproj file.
(Edit) If you want to turn off the 'fk sync' you can use the setting named "Relationships follow db foreign key constraints".
Joined: 20-Sep-2012
Hello David,
thanks for your advice. For speed, I have to get things working for my client, I thought I would reset all IsOptional fields to False and All IsNullables to False. Kept me busy for almost two hours and left me a painfull wrist of all the clicking everywhere. After that I couldn't resist to try to refresh again, what happened? All settings reverted back to IsOptional=True and IsNullable=True.... AAAAHHHHH!!
I have attached a reproducable sample of my findings in my small Access Database sample.
Be my guest to figure out what is happening overhere.
Niels
Filename | File size | Added on | Approval |
---|---|---|---|
llbl-IsOptional-ornot.zip | 111,389 | 31-Jan-2013 10:26.14 | Approved |
Joined: 20-Sep-2012
Then my system setup must be wrong, because either setting this option true or false does not matter in my case....
What do you suggest I should do to perform a clean install, or do you have other options I should consider?
Are there any other settings that are Default now, but should be set to some certain value?
Furthermore, see attachment for the Catalog details after manual editing and before a new refresh.
Filename | File size | Added on | Approval |
---|---|---|---|
Catalog details after manual setting and before new refresh.PNG | 21,045 | 31-Jan-2013 22:45.26 | Approved |
Joined: 20-Sep-2012
And now see the attachment for the Catalog after refresh. Notice that all ID fields now are Nullable again. Maybe this propagates to the IsOptional fields also.
Filename | File size | Added on | Approval |
---|---|---|---|
Catalog details after manual setting and after new refresh.PNG | 18,312 | 31-Jan-2013 22:48.25 | Approved |
Joined: 28-Nov-2005
That is expected: The Catalog Refresher must be an exact representation of your DB. The model, on the other hand, is what you can modify. IsNullable is the Catalog side (aka your DB), IsOptional is the model side, the one you can modify and it's preserved.
So, in your case, the important thing is the IsOptional flag, the one you will use in your code. The IsNullable will be always in sync with your DB. The fix that was introduced is that when you modify the IsOptional flag (model side), it's preserved over refreshes.
Said that, your repro case works like expected.
Joined: 20-Sep-2012
Ofcourse, then I shouldn't set anything on the Catalog side in the designer as I did before when the red cross appeared I thought I should change it, because I could. how wrong of me. Now it is only a warning on the lower side without a red cross and which I can ignore.
But... how to fix the problem with the scale. I know I changed it at the Catalog side before and that worked, but now it refreshes also from the DB. Let me try to explain:
I have lots of Currency fields in my Access DB. These are all scale 4 (no matter if I set the property 'Decimal places' in Access, this setting only effects display in tables and queries - setting 'Decimal places' is ignored by LLBLGen, that's fine) So all my calculations work with 4 decimals and if I want to save only 2 decimals I round to two in my code and if I dont, then with 4 decimals.
So, how can I use 4 decimals? Setting it in the Catalog is useles because the next refresh it is reset to 2. I tried the setting 'Length precision scale follow dblength precision scale' both True or False but always set it to 2 decimals. Do I need a filter, converter, a hidden setting?