Project Properties
Each project has its own set of settings, most of them initialized with a
value inherited from the Designer
Preferences. These settings are called Project Properties, and
are editable through the Project Properties Editor.
The meaning of each property setting is described below. Each property is
listed in the same group as it is listed in the Project Property Editor.
It's highly recommended you examine the various project properties right
after you have created a new project, as they control the behavior of the
various features of the designer when operating on various project elements.
A project property overrides a preference with the same meaning.
This helps with a consistent designer behavior when a project file is shared
among team members: the project properties are stored inside the project
file, the designer preferences are stored locally on the user's computer.
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.
The value Default means the value in the preferences is used.
- 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. The value Default means the value in the preferences is
used.
- 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. The value Default means the value
in the preferences is used.
- 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. The value Default means the value in
the preferences is used.
- 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. The value
Default means the value in the preferences is used.
- 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. The value Default means the
value in the preferences is used.
- 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. The value Default means the
value in the preferences is used.
- ResetFieldOrderBasedOnTargetOrderAtRefresh. This setting,
false by default, when true, resets all field indexes to the target
ordinal after a catalog refresh.
- 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. The value Default means the value in the
preferences is used.
- 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.
The value Default means the value in the preferences is used.
- 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. The value Default means the
value in the preferences is used.
- 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. The value Default means the value in the
preferences is used.
Designer behavior
- AdditionalTaskPerformerFolder If specified, LLBLGen Pro will
look for taskperformer assemblies in this folder as well, besides the
default taskperformer folder. 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 don't want to use an additional folder,
leave it empty.
- AdditionalTasksFolder If specified, LLBLGen Pro will look for
*.tasks/*.platform/*.presets files in this folder as well, besides the
default Tasks folder. 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 don't want to use an additional folder, leave it empty.
- AdditionalTemplatesFolder If specified, LLBLGen Pro will look
for templateGroups.config/*.language/*.templatebindings/*.frameworksettings
files in this folder as well, besides the default Templates folder and
the additional templates folder defined in the LLBLGen Pro preferences.
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
don't want to use an additional folder, leave it empty.
- AdditionalTypeConverterFolder If specified, LLBLGen Pro will
look for assemblies with TypeConverter classes in this folder as well as
.typeimports files, besides only in the default TypeConverterRootFolder
folder defined in the LLBLGen Pro config file. 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 don't want to use an
additional TypeConverter folder, leave it empty.
- 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.
- 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.
- 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.
- 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. The value Default means the value in the
preferences is used.
- 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.
- 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.
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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
- 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.
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.
- 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. 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. 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.
- 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. 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
Task performers, General
- 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
- ConnectionStringKeyNamePattern The pattern for the key in the
generated config file under which the connection string for a target
database is stored. A macro is required for this property: {$ProviderName}.
This macro is replaced with the short name in the driver.config of the
active driver. This way multiple connection strings can be emitted into
the generated code without name clashes.
- 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
- RootNamespace The initial root namespace to use for code
generation
- 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
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.
- 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.
See also