LLBLGen Pro v1.0.2004.2 released!
After 4 months of development and 2 months of beta-testing, it's finally done: LLBLGen Pro v1.0.2004.2 has been released!
Below is the full list of changes and new features. Of course, this upgrade is free for customers.
Drivers
Changed
- SqlServer / Oracle drivers now shows a stored procedure selector form if the preference ManualSelectSProcsFromSchema is set to true.
- SqlServer driver now only determines the resultsets of stored procedures if the preference SqlServerAutoDetermineSProcType is set to true, otherwise it relies on the values specified in the stored procedure selector.
- DB2 driver now has a better FK retrieval routine which is 4 times faster.
Core
Changed
- User preferences now have settings for strip patterns for entity names, typedview names, stored procedure names, entity field names and typed view field names.
- Entity, view and stored procedure meta data retrieval now strips prefixes and suffixes and users can specify more than one prefix/suffix.
- The preference CorrectNameCasing is now split into 2 preferences: RemoveUnderscoresFromElementName and MakeElementNamePascalCasing.
- The name generation for fields mapped on a relation now uses two new patterns defined by the preferences FieldMappedOnManyToManyPattern and FieldMappedOnOneManyToOnePattern to construct the name.
- Refresher: catalog/schema names have to be found in the target database. If not, the catalog can't be refreshed.
- Refresher now takes advantage of the new loggin framework for better reporting.
Added
- Multiple catalog support (sqlserver) / multiple schema support (Oracle)
- User preferences and project properties FieldMappedOnManyToManyPattern and FieldMappedOnOneManyToOnePattern patterns for specifying the format of the field mapped onto a relation. Several pattern elements are available to specify a format.
- Preference settings SqlServerAutoDetermineSProcType and ManualSelectSProcsFromSchema options for allowing the user to better specify which elements to retrieve.
- Refresher options: CreateBackupBeforeRefresh, VerboseRefresh, SyncMappedElementNamesAfterRefresh, UpdateCustomPropertiesAfterRefresh, ShowReportAfterRefresh, AddNewElementsAfterRefresh, AddNewViewsAsEntitiesAfterRefresh.
- Catalog refresh log is more detailed and contains information about actions which weren't logged before.
- Root folder tag definition for plugins to the application config: pluginsRootFolder
- Additional folder tag definition for template sets: additionalTemplateSetsFolder. This folder can be used for generic template sets not tied to a driver, like .lpt templates for BL code. This folder is also relative to the application root.
- Plugin system, plugin base classes, plugin control interface
- Option to ignore system elements when retrieving entities/typed views from the catalog(s).
- Entities can now also be mapped on views, which allows the user to create relations between an entity mapped on a table and an entity mapped on a view, add an entity mapped on a view to a typed list etc.
- Entities can now have fields mapped on fields in a related entity, if that entity is related using an 1:1 or m:1 relation.
Removed
- CollectionNamePostfix property of project/user preferences has been removed.
Task Performers
Changed
- TDL Statement <[ TypeOfField ]> now returns the type of the field mapped on a related field if it's used in a Foreach RelatedEntityField loop.
- TDL Statement <[ SourceCatalogName ]> now also works within SPCall loops.
- <[ IsForeignKey ]> now also returns the target language's true keyword if the field is the base in a custom relation.
- SelfServicing generator configs are now called 'SelfServicing, .... scenario...
- TDL now sorts ascending the in the loop participating elements before running the following loops: Foreach ActionStoredProcedureCall, Foreach Entity, Foreach RetrievalStoredProcedureCall, Foreach TypedList and Foreach TypedView.
Added
- Ability to store log information into a general Tasks log using LogNodes from a task performer. This log is shown later on if the user opted for that option.
- Ability to clean up the vs.net project file before new file references are added. This is controlled by a setting in the project properties and only effective if the file has to be altered when existent.
- Ability to specify if the time should be generated into the TDL template output. This is controlled by a setting in the project properties.
- Ability to specify regions in the templates which are preserved between code generation cycles.
- TDL statements: <[ UserCodeRegion "name" | nameToken "pattern" ]> <[ EndUserCodeRegion ]>, <[ JoinHint ]>, <[ StartEntityAlias ]>, <[ EndEntityAlias ]>, <[ AggregateFunction ]>, <[ EntityAlias ]>, <[ FieldCaption ]>, <[ Foreach RelatedEntityField separator ]> <[NextForeach]>, <[ If not IsReadOnly ]> <[ EndIf ]>, <[ MappedFieldNameRelatedField ]>, <[ RelatedEntityFieldName ]>, <[ If Not EntityIsAliassed ]> <[ EndIf ]>, <[TargetType]>, <[If Not HasMultipleCatalogs]><[EndIf]> <[ If IsForeignKey ]> <[ EndIf ]>
- Enum definitions for typed list fields.
- VS.NET 2005 project file support to the ProjectFileCreator task performer. As the fileformat of VS.NET 2005 projects is a bit unclear, it is currently a bit problematic to define references to assemblies: file format is unknown.
- New reserved templateIDs: SD_VsNet2005Template, SD_VsNet2005AdapterTemplate, SD_VsNet2005DBSpecificAdapterTemplate
- For Adapter, the code emitter now recognizes settings for namespace suffix, project file suffixes and project folder names
Gui
Fixed
- Custom properties of Typed Lists weren't saved properly
- Slow rendering of added elements when there were a lot of elements already in the project.
Changed
- Database Drivers are now sorted by name in the driver drop-down box in create a new project wizard.
- Objects in the object selector (to select participating objects) are now sorted alphabetically.
- Project properties are now edited in a decent property grid.
- Add Entity/TypedView/StoredProcCall screens now use one unified form. This form now has better tools for the developer to select which element to add and it now uses the Janus GridEX v2 grid.
- The form for adding new elements (entity/proc/typed view) is no longer pre-selecting all shown elements.
- The Custom Properties editor don't accept CR/LF in the editor anymore.
- Infragistics UltraWinGrid out, Janus GridEx v2 in.
- New Typed List editor.
- Better reporting why an FK is rejected during schema meta data retieval.
- Better streamlined subset selection of objects for code generation.
Added
- Stored procedure selector form to be used by various drivers.
- Catalog rename functionality in the catalog explorer, to overcome name changes for catalogs.
- Catalog / schema removal functionality in the catalog explorer.
- Unattended catalog refresh (one or more catalogs can be refreshed unattended).
- Better log viewer and better refresher log display with export functionality to XML or RTF
- Option added to ask a confirmation from the user when the gui is closed.
- Option added to specify to open an element when doubleclicking it in the project explorer. Default behavior is expanding the node.
- Option added to ask for confirmation from the user when deleting an element in the project explorer
- DEL key is now shortcut for deleting an element from the project in the project explorer.
- Forecolor and Backcolor of Project Explorer nodes of changed elements (also new elements) can be set by the user to signal which elements have been changed by a given operation.
- Option to switch off the hints in various editor screens to save space.
- Join hint specification to relations in typed list
- Aggregate function setting for fields in typed list
- Multi-join of same entity in Typed list.
- Caption for typed list/typed view fields.
- Startup position of gui is preserved.
- Participating objects can now be saved as a group.
- In object selector, related entities can now be checked automatically
- In object selector, when a typed list is checked, all entities in that typed list are checked as well.
- Plugin execution system in the GUI, plugin starter form.
- Plugin for adding custom properties to a wide range of objects at once.
- Plugin related options in user preferences
- Support for entities mapped on views
- PK Fields for entities can now be set/unset if the map target doesn't have any PK fields (table with no PK fields, or a view).
- Entities can now have fields mapped on fields in a related entity, in the designer, if that entity is related using an 1:1 or m:1 relation. The EntityEditor has a new tab for this, plus the ProjectExplorer has a new node for this for each entity.
- Ability to show a log of all task performers ran during the code generation process and export the log to XML or RTF
- Ability to specify an option to clean up vs.net project files before adding new file references.
- Ability to specify an option to generate the time/date into TDL template output.
- Ability to specify an additional folder for generator configs, in the project properties. This folder can be specified absolute, or relative to the project location.
- Ability to specify an additional folder for template set configs, in the project properties. This folder can be specified absolute, or relative to the project location.
- Five new settings to configure the Adapter generated code structure: namespace suffix, project file suffixes and project folder names
- Close All Tabs feature (Ctrl+shift+F4)
- Fields in entities can now be marked as readonly.
Templates
Changed
- The generated code is no longer depending on the PredicateFactory class. This means that in very large projects (e.g. 1000+ entities) it is now possible to remove the predicate factory class from the generated code, which can keep the size of the generated code base handleable, as the predicateFactory class can grow really big if a lot of entities are in the project.
- In the generated code, the EntityType enum is now referenced with its full name, including namespace.
- VB.NET templates now have the XML comments commented with ''' instead of ' /// .
- The regions for custom include code are renamed to "Included code", to avoid confusion.
Added
- A lot of classes have now UserCodeRegion regions which allow users to add code to various places in the generated code which are preserved between code generation sessions
- A new include statement has been added to the InitClass methods (InitClassEmpty and InitClassFetch) so custom code can be injected into every entity generated, for example if a general ConcurrencyPredicateFactory is used.
- Stored procedure calls now take into account multiple catalogs (sqlserver) or schemas (oracle)
- SelfServicing: FetchUsingPK and FetchUsingUC.. overloads now accept a Context object.
- VS.NET 2005 project templates. These formats are based on the VS.NET 2005 Beta 1 formats and will change when the final format is known.
- GeneralEntityFactory for Adapter. (in the EntityFactories.cs/vb file, Factories namespace)
Runtime Libraries
Fixed
- When entity(2).SetNewFieldValue(index, null/Nothing) was called and the field with the specified index was an FK field, the related entity wasn't dereferenced.
- Paging over object sets which contain duplicates and DISTINCT could not be applied will now work correctly: the code switches to a client side paging routine in this situation.
- When a new entity was both added to a unit of work object for save and then added for delete, it was still saved during UnitOfWork(2).Commit().
Changed
- DataAccessAdapterBase.CreatePrimaryKeyFilter() is now public virtual. Also added to IDataAccessAdapter.
- EntityCollectionBase(2).Sort() now accepts an IComparer implementation in the overload to sort entities based on the comparer and the field values.
- EntityCollectionBase(2).Sort() now uses ArrayList's QuickSort algorithm.
- EntityBase(2).Validate is now virtual.
- Paging using a page size of 1 is now allowed (the minimum size was 2)
- Entity Save methods will now validate the entity only when the entity is actually changed. If the entity is not changed, no validation is performed, as the entity doesn't participate in the entity save cycle. This avoids visiting the validate routine more times than required.
- entity(2).SetNewFieldValue(int, object) is now virtual and overriden in generated code entity classes.
- Methods in UnitOfWork(2) classes now are properly made virtual when appropriate.
- IEntityCollection2.ContainsDirtyEntities set has been removed. The collection now determines at request if the collection contains dirty entities.
- PrefetchPath(2).Add now checks if a node is already added and if so, throws an ArgumentException.
- EntityBase(2).SaveFields()/RollbackFields are now virtual
- Readonly fields can't be updated in the database anymore using tricks. This isn't a change that will affect existing code, it's an extra restriction on the code in cases of malicious use.
- The temporary results in PrefetchPath elements are now cleared after a prefetch path fetch. This opens the way to re-use prefetch path objects.
Added
- New exception class: ORMQueryConstructionException, which is used to pick up unrecoverable errors in the DQE's.
- EntityFields and EntityFields2 now implement IEnumerable
- DataAccessAdapter.OnGetScalar added, which is called right before the GetScalar retrieval query is executed. Also added to IDataAccessAdapter.
- Various DQE's now throw an ORMQueryConstructionException if the insert query is empty, i.e. doesn't have any fields in the fields list.
- OnFieldValidate(field) and OnFieldValidateComplete(field, result) have been added to EntityBase(2) classes as protected virtual.
- OnSave() and OnSaveComplete() methods (protected virtual) to the EntityBase class.
- OnDelete() and OnDeleteComplete() methods (protected virtual) to the EntityBase class.
- Saving a transaction (creating a savepoint) with a name already specified now throws an ArgumentException, as well as Rollback(name) when name is not specified with a call to the save method for the transaction in the same transaction. (case sensitive).
- Ability to specify a group by clause in a FieldCompareSetPredicate instance.
- Paging support on MS Access (client side)
- Entity classes and entity collections now implement IXmlSerializable, which offers full XML Webservice support.
- Compact XML export / import facility, using FormatAspect flags which can be passed to WriteXml().
- Developers can now opt for having text strings with markup codes (a single '<' or '>' triggers the feature) included in CDATA blocks when the object graph is exported to XML.
- DateTime values can now be exported in DataSet's DateTime format, when exporting an object graph to XML.
- DataAccessAdapter.GetDbCount() (various overloads) which provides a more sophisticated way to grab the amount of rows in a set defined by query elements passed in than GetScalar does in queries with a group by. Not supported on Firebird, as Firebird doesn't support derived tables in SQL, so Firebird users still have to use GetScalar.
- Fine-grained tracing information system has been added to the runtime libraries for tracing calls through the library and determine SQL query generation at runtime. Various trace switches have been added to control the tracing logic.
- Catalog and schema name overwriting for multiple catalogs and schemas, for SqlServer, Oracle and DB2. The names can be configured in the .config file via easy key-value pairs.
- Oracle specific setting which can be added to the .config file which sets the DQE in a mode to generate CURRVAL sequence queries, which can be used in databases where triggers are used to create sequence values.
- Uniquing Context, which provides a unique object per loaded entity, so entity data which is fetched multiple times with the same context will result in the same entity object.
- Refetching of entities with prefetch paths to add new data to the existing object graph. Using a uniquing context the same objects can be 'adjusted' with newly loaded entity objects.
- When a field mapped onto an 1:1/m:1 relation is set to null/Nothing (e.g. order.Customer = null; ), the FK field(s) forming that relation (e.g. order.CustomerID) are set to null/Nothing. Saving the entity will then update those fields to null in the database.
- UnitOfWork(2) classes now have remove methods for entities and collections to remove these objects from the UnitOfWork objects.
- UnitOfWork2 (Adapter) now offers the ability to specify DeleteEntitiesDirectly and UpdateEntitiesDirectly calls
- UnitOfWork (Selfservicing) now offers the ability to specify DeleteMulti(1/2) and UpdateMulti(2/3) calls which are executed directly on the database.
- UnitOfWork(2) classes now offer the ability to schedule delegate calls during UnitOfWork commits. This can be handy when you want to call an action stored procedure during the Commit (before insert/ before update / before delete / post delete slots are defined in which you can schedule the delete call).
- IEntityField(2).IsNullable, a flag which is available in both adapter and selfservicing fields and which reflects if a field can accept NULL values in the database (true) or not (false). In selfservicing this field is equivalent to SourceColumnIsNullable.Get
- EntityField(2) instances can now be set to readonly through the constructor.
- Expression has now 2 extra constructors: Value Operator Expression and Expression Operator Value.
- EntityFields(2).Expand(int). A method which allows you to expand an existing entity fields(2) object. This is useful for adding typed list fields in code.
- EntityRelation.CustomFilterReplacesOnClause flag to signal Join construction logic to use a specified CustomFilter as the ON clause instead of appending it with AND to the field relation clause.