Designer Preferences
The LLBLGen Pro designer is controllable through various preferences.
These preferences are editable through the
Designer Preferences Editor. The
meaning of each preference setting is described below. Each preference is
listed in the same group as it is listed in the Designer Preference Editor.
It's highly recommended you examine the various preferences before
you create a new project as a new project inherits many of the preferences
available.
Catalog Refresher
- AddNewElementsAfterRefresh When set to true, any new entities, typed views and stored procedures
are added to the project automatically after a catalog refresh has been completed
- AddNewFieldsAfterRefresh When set to true (default), any
newly found, unmapped field in an entity's target, which hasn't been
removed previously from the entity, is added as a new entity field to
the Entity automatically after a catalog refresh has been completed,
except if the entity is in a TargetPerEntityHierarchy hierarchy and not
the root of the hierarchy. If the entity is in a
TargetPerEntityHierarchy hierarchy and the new target field is not
nullable, it's added to the root entity only, if this setting is set to
true.
- AddNewViewsAsEntitiesAfterRefresh When set to true, for each
new view found in the catalog(s) a new entity will be added to the
project automatically, after a catalog refresh has been completed.
Default is false. This option is ignored if AddNewElementsAfterRefresh
has been set to false as well.
- CreateBackupBeforeRefresh When set to true, LLBLGen Pro will
backup your current project before refreshing any catalogs. This is the
default and recommended setting.
- DriverCommandTimeout The value of this setting controls the
timeout value of the ADO.NET commands used to retrieve relational model
data from the database when a project is created or when a catalog is
refreshed. Specified in seconds. Not used with Firebird as Firebird
doesn't support command timeouts.
- IdentifyingFieldsFollowDBPrimaryKeyConstraints When set to
true (Default), all identifying fields in entities have to have a target
field which is also a primary key in the new relational model data after
refresh, or they'll be cleared from being identifying fields. When set
to false, identifying fields without a primary key field as target in
the new relational model data are left as-is and there aren't any fields
marked as identifying fields based on primary key fields found in the
new relational model data.
- LengthPrecisionScaleFollowDBLengthPrecisionScale When set to
true (Default), a model field / parameter will have its type parameters
max length, precision and scale synced with the target it is mapped on (ValueType
contained fields are not updated, as they can have more than one
target). When set to false, it will leave the model field / parameter
type information as-is, which could cause validation errors.
- RelationshipsFollowDBForeignKeyConstraints When set to true
(Default), all normal relationships which are not marked as 'model-only' have to have a foreign key constraint in
the new relational model data after refresh, or they'll be removed. When
set to true, new relationships are created from newly found foreign key
constraints. When set to false, relationships without a foreign key
constraint in the new relational model data are left as-is and there
aren't any new relationships created from foreign key constraints found
in the new relational model data.
- RemoveUnmappedElementsAfterRefresh When set to true, any
element which doesn't have a mapping after a catalog refresh is removed
from the project. Default is false.
- ResetFieldOrderBasedOnTargetOrderAtRefresh. This setting, false by default, when true, resets all
field indexes to the target ordinal after a catalog refresh. A new
project inherits the preference value.
- ShowReportAfterRefresh When set to true, the refresher will
show a report after the refresh has been completed with the changes it
could detect. It's recommended to have this option set to true.
- SyncMappedElementNamesAfterRefresh When set to true, LLBLGen
Pro will rename any entity, navigator, typed view, entity field and
typed view field if the name of the element they're mapped on has
changed, for example a table field was renamed. Setting this option to
true can break your own code, so use this option with care. When
SyncRenamedMappedElementNamesAfterRefresh is set to false, only
non-manually changed element names are synced, otherwise all element
names are synced.
- SyncRenamedMappedElementNamesAfterRefresh When set to true
(default: false), LLBLGen Pro will sync manually renamed elements after
a refresh if SyncMappedElementNamesAfterRefresh is set to true and the
name of the element they're mapped on has changed. If
SyncMappedElementNamesAfterRefresh is set to false, this setting is
ignored. Multiple entities mapped onto the same target will all be
resynced in case of a target name change, so use this setting with care.
- UniqueConstraintsFollowDBUniqueConstraints When set to true
(Default), all unique constraints in entities have to have a unique
constraint in the new relational model data after refresh, or they'll be
removed. When set to true, new unique constraints are created from newly
found unique constraints. When set to false, unique constraints without
a unique constraint in the new relational model data are left as-is and
there aren't any new unique constraints created from unique constraints
in the new relational model data.
- UpdateCustomPropertiesAfterRefresh When set to true, any
custom property in an entity, entity field, typed view, typed view field
or stored procedure will be updated with a similar named custom property
in the newly catalog information, after a refresh of the catalog(s).
Setting this option to true can break your own code, so use this option
with care. If you have set RetrieveDBCustomProperties to false, this
option has no effect.
Designer behavior
- AdditionalPluginsFolder The additional plug-ins folder to
load plug-ins from. This is an absolute path
- AdditionalTasksFolder The additional tasks folder to load
tasks and related files from. This is an absolute path. The designer
will search this folder for *.tasks/*.platform/*.presets files
- AdditionalTemplatesFolder The additional templates folder to
load templates from. This is an absolute path. The designer will search
this folder for templateGroups.config/*.language/*.templatebindings/*.frameworksettings
files
- AutoAssignSequencesToIntegerPks When set to true (default),
the designer will for every auto-mapping action try to assign a sequence
to every integer typed identifying field, if the identifying field is
the only field for the entity, it's not a foreign key field and not
inherited. If no sequence could be found and the target database
supports user sequences, a new sequence will be created, using
SequencePattern. A new project will inherit this value.
- AutoAssignTypeConverterToFieldMapping When set to true, the
Type Conversion Definitions in the project are searched for a matching
Type Converter for the mapping of a field and if found the Type
Converter is assigned automatically to the field's mapping. Used during
reverse engineering, relational model data refresh, forward mapping to
new fields and forward mapping to existing fields. Default is false. A
new project will inherit this value.
- ChangedElementBackColor When an entity, typed list, typed
view or stored procedure call definition is changed, its node's back
color in the project explorer will change color to the color set as
ChangedElementBackColor.
- ChangedElementForeColor When an entity, typed list, typed
view or stored procedure call definition is changed, its node's text
color in the project explorer will change color to the color set as
ChangedElementForeColor.
- ConfirmDesignerClose When set to true, the user has to
confirm a closure of the LLBLGen Pro designer
- CreateBackupBeforeImport. Similar to
CreateBackupBeforeRefresh. True by default, it creates a backup
before the user imports data into the actual project, as importing a
model is non-undoable. The backup makes it possible to revert to a
project state before the import action.
- CreateBackupBeforeRunningPlugin When set to true (default), a
backup of the current project is created before you run a plugin. It is
recommended you leave this setting set to true.
- DefaultBackupFolder The default backup folder in which
LLBLGen Pro will create backups of the project loaded, for example
before when a refresh is performed. Specify the folder with full path or
if you want to make the path relative to the project location, specify
the path as a relative path. A relative path starts with '.\' or with
'..\' (without the quotes). If you leave this preference empty, the
default, the folder the project file is located in, is used.
- ExpandGroupNodesOnProjectLoad. True by default.
When set to false, group nodes are not expanded in the project explorer
after the project has been loaded.
- GroupUsage This setting controls how the grouping
functionality of the designer is used with respect to the generated
output: solely as visual grouping construct (default) (so all elements
in the entire project are seen as one project) or as separate projects
(one per group). If you choose to see groups as separate projects,
validation will verify that there are no ties between groups whatsoever
and will report errors if there are. If you choose to see groups as a
visual grouping construct only, validation will verify if there are
duplicate named elements among groups and will report errors if there
are. A new project will inherit this value.
- HideForeignKeyFieldsInEditor When set to true, the designer
will hide foreign key fields in field editors using a filter (which is
editable). When set to false (default) all fields are shown by default
in the field editors.
- ProjectExplorerOpenElementOnDoubleClick When set to true,
double-clicking an element node (entity / typed list / typed view /
stored procedure call) will also open the element in its editor. The
element's node is also expanded/collapsed. When set to false,
double-clicking a node in the tree will just expand/collapse the node.
- SearchQueryDefaultLanguage The .NET language to pre-select in
the Element Search dialog.
- ShowProjectPropertiesAfterProjectCreate When set to true
(default), the designer will automatically show the project properties
dialog when a new project has been created.
- SyncRelationalModelDataElementNameAfterRename When set to
true, the designer will automatically synchronize a table name or table
field name with its mapped project element if the project element is
manually renamed in the designer. Default is false.
- TargetPerEntityEdgesRequireBackingFkConstraint. If true (default), the designer will require that
every inheritance edge between a subtype and a supertype in a hierachy
of type TargetPerEntity has a backing foreign key constraint in the
relational model data (if supertype and subtype are mapped both mapped
onto tables in the same catalog). Only set this to false in the
situation when you need to define a TPE hierarchy and can't add new
foreign key constraints. A new project inherits this value.
- UseCustomFieldOrderingOnNewElements. False by default. If true, it will set the FieldIndexes of the
fields created through reverse engineering and when fields are added to
a new entity through model-first functionality. This setting can help in
a DB first scenario when ordinals on target tables have to be used to
guide field ordering, and when new entities are created in the designer
and fields have to have a given order from the start. A new project
inherits this value.
- VerboseApplicationOutput When set to true, the application
output window's verbose setting will be set to true at application
startup.
Name construction
- EnforcePascalCasingAlways When set to true, the setting 'MakeElementNamePascalCasing'
is enforced always. When set to false, the setting 'MakeElementNamePascalCasing'
is enforced only when names for new elements are created. A new project
will inherit this value
- MakeElementNamePascalCasing When set to true, all names of
new entities, entity fields, typed views etc. will be properly PasCal
cased. This means that each character in the name is lowercased, except
the first character after each word boundary ('_' or ' ') and the first
character. All spaces are always removed. When set to false, the name is
left untouched, except for the first character, which will always be
UpperCase. A new project will inherit this value.
- RemoveUnderscoresFromElementName When set to true, all single
underscores in names of new entities, entity fields, typed views etc.
will be removed. When set to false, the name is left untouched. A new
project will inherit this value.
Name construction, Name patterns
- FieldMappedOntoRelatedFieldPattern The pattern which is used
to construct the names for Fields mapped onto a related field. Pattern
elements can be: {$RelatedEntityName} for the name of the related entity
which contains the mapped related field and {$RelatedFieldName} for the
name of the field in the related entity which is mapped by the field
mapped onto a related field. You can also specify any literal text. An
element can be mentioned more than once. A new project will inherit this
value
- ForeignKeyFieldPattern The pattern which is used to construct
the names for Foreign Key fields in entities. Pattern elements can be:
{$NavigatorName} for the navigator name mapped onto the relationship
used, {$RelatedFieldName} for the field referred to by the foreign key
field (the PK field) and {$RelatedEntityName} for the name of the
related entity (the PK side). You can also specify any literal text. An
element can be mentioned more than once. A new project will inherit this
value.
- NavigatorMappedOntoManyToManyPattern The pattern which is
used to construct the names for Navigators mapped on m:n relationships.
Pattern elements can be: {$StartEntityName} for the name of the start
entity, {$EndEntityName} for the name of the end entity, {$IntermediateEntityName}
for the name of the intermediate entity, $P or $S suffix to entity name
macros to pluralize or singularize them (example: {$EndEntityName$P}),
{$StartEntityFieldNames} for all the names of the fields of the
relationship in start entity, {$EndEntityFieldNames} for all the names
of the fields of the relationship in the end entity and any literal
text. An element can be mentioned more than once. A new project will
inherit this value.
- NavigatorMappedOntoOManyToOnePattern The pattern which is
used to construct the names for Navigators mapped on m:1 or 1:1
relationships. Pattern elements can be: {$StartEntityName} for the name
of the start entity, {$EndEntityName} for the name of the end entity, $P
or $S suffix to entity name macros to pluralize or singularize them
(example: {$EndEntityName$P}), {$StartEntityFieldNames} for all the
names of the fields of the relationship in start entity, {$EndEntityFieldNames}
for all the names of the fields of the relationship in the end entity
and any literal text. An element can be mentioned more than once. A new
project will inherit this value
- NavigatorMappedOntoOneToManyPattern The pattern which is used
to construct the names for Navigators mapped on 1:n relationships.
Pattern elements can be: {$StartEntityName} for the name of the start
entity, {$EndEntityName} for the name of the end entity, $P or $S suffix
to entity name macros to pluralize or singularize them (example: {$EndEntityName$P}),
{$StartEntityFieldNames} for all the names of the fields of the
relationship in start entity, {$EndEntityFieldNames} for all the names
of the fields of the relationship in the end entity and any literal
text. An element can be mentioned more than once. A new project will
inherit this value.
Name construction, Strip patterns
- EntityFieldNameStripPattern The pattern which contains two
sections, enclosed in {}, one for the prefixes and one for the suffixes.
Add prefixes and suffixes to strip off by separating them by a comma.
The first match is stripped. If the entity field's name is equal to a
prefix/suffix strip pattern, nothing is stripped off. Stripping is case
insensitive. A new project will inherit this value.
- EntityNameStripPattern The pattern which contains two
sections, enclosed in {}, one for the prefixes and one for the suffixes.
Add prefixes and suffixes to strip off by separating them by a comma.
The first match is stripped. If the entity's name is equal to a
prefix/suffix strip pattern, nothing is stripped off. Stripping is case
insensitive. A new project will inherit this value. Example: prefix
strip pattern tbl_ and suffix strip pattern _dev will form the strip
pattern {tbl_}{_dev}.
- StoredProcNameStripPattern The pattern which contains two
sections, enclosed in {}, one for the prefixes and one for the suffixes.
Add prefixes and suffixes to strip off by separating them by a comma.
The first match is stripped. If the stored procedure's name is equal to
a prefix/suffix strip pattern, nothing is stripped off. Stripping is
case insensitive. A new project will inherit this value. Example: prefix
strip patterns pr_ and sp_ and suffix strip pattern _dev will form the
strip pattern {pr_, sp_}{_dev}.
- TypedViewFieldNameStripPattern The pattern which contains two
sections, enclosed in {}, one for the prefixes and one for the suffixes.
Add prefixes and suffixes to strip off by separating them by a comma.
The first match is stripped. If the typed view field's name is equal to
a prefix/suffix strip pattern, nothing is stripped off. Stripping is
case insensitive. A new project will inherit this value.
- TypedViewNameStripPattern The pattern which contains two
sections, enclosed in {}, one for the prefixes and one for the suffixes.
Add prefixes and suffixes to strip off by separating them by a comma.
The first match is stripped. If the typed view's name is equal to a
prefix/suffix strip pattern, nothing is stripped off. Stripping is case
insensitive. A new project will inherit this value. Example: prefix
strip pattern vw_ and suffix strip pattern _dev will form the strip
pattern {vw_}{_dev}.
Relational model data element construction
- InsertUnderscoreAtWordBreakCaseSensitiveDBs When a new table
or table field has to be constructed based on a project element (entity,
field, typed view), or when the project element is manually renamed and
SyncRelationalModelDataElementNameAfterRename is set to true, the name
for the element is based on the project element name using this setting.
Ignored on case-insensitive databases. When set to true, an underscore
is inserted at word breaks. Default is false. A new project will inherit
this value.
- PreferDecimalOverCurrencyTypes When set to true (default),
the designer will, when creating a relational model data field element,
prefer the decimal type (if present / supported) over currency / money
types (if present / supported), when more than one database type matches
the model element's .NET type.. When set to false, currency / money
types are prefered. A new project will inherit this value
- PreferNaturalCharacterTypes When set to true (default), the
designer will, when creating a relational model data field element,
prefer natural character database types (e.g. nvarchar, nchar) over
normal character database types (e.g. char, varchar), when more than one
database type matches the model element's .NET type.. When set to false,
normal character database types are prefered. A new project will inherit
this value
- PreferVariableLengthTypes When set to true (default), the
designer will, when creating a relational model data field element,
prefer variable length database types (e.g. varchar, varbinary) over
fixed length database types (e.g. char, binary), when more than one
database type matches the model element's .NET type. When set to false,
fixed length database types are prefered. A new project will inherit
this value
- RelationalModelDataElementNameCasingCaseSensitiveDBs When a
new table or table field has to be constructed based on a project
element (entity, field, typed view), or when the project element is
manually renamed and SyncRelationalModelDataElementNameAfterRename is
set to true, the name for the element is based on the project element
name using this setting. Ignored on case-insensitive databases.
AllUpperCase means all characters are upper-cased. AllLowerCase means
all characters are lower-cased, AsProjectElement will use the name of
the project element as-is. A new project will inherit this value.
- SequencePattern The pattern which is used to construct the
names for sequence objects in the relational model data using
auto-mapping functionality. Pattern elements can be: {$EntityName} for
the name of the entity containing the identifying field which is
sequenced and {$FieldName} for the name of the field which is sequenced.
You can also specify any literal text. An element can be mentioned more
than once. A new project will inherit this value
- SetSchemaNameAfterGroupName. If true (default), an automatically created table will have its schema
name set after the group name the entity is in. Otherwise the schema
name will be set to the default schema name. A new project inherits this value.
- ShowReportAfterAutoMap When set to true (default), the
designer will show a report after the Auto-map of unmapped
entities/unmapped entity fields features have been executed.
Reverse Engineering
- AutoAddManyToManyRelationships When set to true, the designer
will automatically add new m:n relationships it detects during the
reverse engineering process of entities from relational model data.
Default is false. A new project will inherit this value.
- FkFieldsAreNamedAfterTargetField When set to true (default),
the name of a foreign key field in an entity created through reverse
engineering, is created from the target field of the foreign key field.
When set to false, the ForeignKeyFieldPattern is used to construct the
name for the foreign key field. A new project will inherit this value.
- RetrieveDBCustomProperties When set to true, all custom
property data of the database objects a new project object is based on
will be copied to the object's Custom Properties. A new project will
inherit this value
- SetGroupNameAfterSchemaName When set to true (default), the
designer will automatically set the group name of new elements to the
name of the schema the target element is located in. If the target
database has a default schema name (e.g. 'dbo'), the default schema name
is converted to the empty string for the group name. If the target
database doesn't use schemas, this setting is ignored. A new project
will inherit this value.
Task performers, General
- AlwaysLoadLptSourceCode When set to true, after each code
generation cycle, the .lpt template runner sourcecode (if any) is opened
in the text editor. The sourcecode is always opened if there are errors
detected during template compilation. Default is false
- CleanUpVsNetProjects When set to true, the VS.NET project
file task performer will first remove all references to files which were
generated by LLBLGen Pro from an existing VS.NET project file, before
adding the files generated. Default is true. A new project will inherit
this value
- EncodingToUse The encoding to use for text files being
written by the generator task performers. Use UTF8 if you use Visual
SourceSafe, as Visual SourceSafe can't handle unicoded textfiles
- FailCodeGenerationOnWriteError When set to true (default is
false), the code generator engines of LLBLGen Pro will throw a
GeneratorAbortException to terminate the code generation cycle if a
write error occurs. A write error is generated when the target file
exists and is readonly and failwhenexistent is false for the executing
task. A new project will inherit this value
- PreferredNamespacePrefix The prefix that is inserted before
the initially root namespace. Typically this is your company name. You
can change this in the generator configuration window. Do not include a
'.' suffix.
- ShowReportAfterCodeGeneration When set to true (default),
LLBLGen Pro will show the report in a modal dialog as logged by the task
performers executed during code generation. The report can be copied to
the clipboard, with formatting, if desired.
- StoreTimeLastGeneratedIntoProject When set to true (default:
false), the time the last generation cycle for a project took place is
stored inside the project. This will make the project 'changed' after
every generation cycle, which could influence sourcecontrol behavior if
you store the .lgp file in a sourcecontrol system. A new project will
inherit this value
Text Editor
- TextEditorFont The font to use in the text editor, which is
used for editing template files and other text-based files opened in the
designer
- VsNetXsdFolder The folder where VS.NET stores the .xsd files
for intellisense on xml based files
- WordWrap When set to true, word-wrap is enabled in text
editors opened in the designer. Default is false
Validation / Relational model data adjustment
- ExcludableOrphanedElementDetectedAction The action to perform
when the system detects an 'orphaned' excludable relational model data
element (element which is not a mapping target). If the specified value
isn't applicable for the specific element, ExcludeFromProject is used
instead. A new project will inherit this value.
- NonExcludableOrphanedElementDetectedAction The action to
perform when the system detects an 'orphaned' non-excludable relational
model data element (element which is not a mapping target). If the
specified value isn't applicable for the specific element, RaiseError is
used instead. A new project will inherit this value.
See also