Runtime libraries v1.0.2004.1 / Access driver now available!

Posts   
 
    
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 24-Sep-2004 21:44:01   

The runtime libraries upgrade v1.0.2004.1, a MAJOR new version of the runtimes and accompanying templates, are now available in the customer area. It's recommended that you upgrade using the full installer to get the latest drivers (the new one for Access as well) and the latest templates as well.

Manual upgrade If you want to upgrade manually, download all the new template packages, the new runtime library archive and the new MS Access driver. For Firebird users it's important that they download the new Firebird driver as well, as it is build against v1.6.2 of the firebird.net provider.

The list of new functionality: All changes:

Runtime Libraries Added

  • MS Access Support
  • Adapter/SelfServicing:_entity_Collection.Sort(fieldIndex), to sort the collection in memory. This solves the problem with having to create a property descriptor to use the IBindingList.ApplySorting() method.
  • Adapter/SelfServicing: GroupByCollection support for typed lists/typed views and datatable fetched dynamic lists
  • Adapter/SelfServicing: HAVING Clause support to the GroupByCollection
  • Adapter/SelfServicing: Aggregate function support on IEntityField(2) objects (entity/typedlist/typedview). An IEntityField(2) instance can have an aggregate function applied to it, which is added to the field's SQL at runtime in Selects. Not all aggregate functions defined are supported on all supported database types.
  • SelfServicing:_entity_Collection.GetDbCount() (overloaded) to retrieve the amount of entities in the database of a given entity type and optionally with a given filter
  • Adapter/SelfServicing: GetScalar() (overloaded) method to retrieve a scalar value from the database without the necessity of creating an entity or typed list. Adapter users should use GetScalar to get the equivalent of GetDbCount()
  • Adapter/SelfServicing, SqlServer specific: SET ARITHABORT ON/OFF setting so inserts can be done in tables which are part of indexed views. See DataAccessAdapter.SetArithAbortFlag() (adapter) and dbUtils.SetArithAbortFlag() (selfservicing)
  • Adapter: COM+ support. See ComPlusAdapterContext class in the database specific project and the unit tests for more information.
  • Adapter/SelfServicing: SQL Expression support for field values. An IEntityField(2) instance now has a property which can be set to an Expression instance. This will make the field be replaced by the SQL representation of the expression. You can use this to make a field value for an entity or typed list or typed view be set to the result of an SQL Expression instead of the actual field value. This also works for updates done directly on the database.
  • Adapter/SelfServicing: Paging support for collections/typed lists/typed views. Paging support is added to the fetch routines and various overloads of these fetch routines. Specify the page size and page number to retrieve a subset of the entities to retrieve. Paging can't be used in combination with prefetch paths, due to restrictions in the paging SQL. Paging is performed on the server with a specialized query. On SqlServer, paging uses temp tables to keep the code compatible with SqlServer 7.
  • Adapter/SelfServicing: IEntityField(2).IsForeignKey has been added.
  • Adapter/SelfServicing: IEntityField(2).DbValue has been added. This is the value the field had when it was read from the database. This value is never overwritten after the fetch (only by a refetch). You can use this property in your Optimistic concurrency predicates
  • Adapter/SelfServicing: UnitOfWork(2) class. You can use this class to collect work to be done (on a single database, for multiple database actions, use a UnitOfWork(2) object per database) when you decide it should be done, for example after a wizard has been completed or when the user clicks 'Save' in a form after making a lot of changes. Entities and EntityCollections can be added to the unit of work classes. Commit() requires a valid transaction object (selfservicing) or a valid adapter (Adapter) to perform all actions (first inserts, then updates, then deletes). Deletes of new entities are ignored.
  • Adapter/SelfServicing: SavePoint support for ADO.NET transactions. Use this to save a transaction under a given name, so a rollback can be done to the state at the time the transaction was saved.
  • Adapter, Oracle specific: Schema name overwrite logic implemented like SqlServer has for Catalog names (see documentation on SqlServer's catalog name overwriting). It is identical to the Catalog name overwriting at runtime only 'Catalog' is replaced with 'Schema' so you can use the documentation on the SqlServer catalog name overwriting for details for now. Use this to clear the schema name at runtime to make the runtime libs target global synonym tables, or set the schema at runtime, per call or per application.
  • Adapter/SelfServicing: Prefetch paths. Various fetch routines (and entity instantiation constructors (selfservicing)) support Prefetch paths. A prefetch path is a graph definition of related entities to fetch together with the actual entity / entities to fetch. Prefetch paths form an efficient way to pull related data out of the database without the requirement to create a query per entity. Prefetch paths support filtering, sorting and support limitation on the amount of objects to return per parent entity. Prefetch paths result in 1 query per entity type, so fetching all orders with their related customers, will result in 2 queries, which are merged by the runtime library code. Prefetch paths do not work with paging as prefetch paths create special queries which can't contain paging logic. All relation types are supported, intermediate entities are not prefetched when an m:n relation is prefetched.
  • Adapter/SelfServicing: Multi-level versioning of entity fields. You can now save an entity's fields under a name inside the entity and roll back to that state later. This can be handy when entities are edited in a wizard or by multiple sources will in-memory rollback requirement.
  • Adapter/SelfServicing, SqlServer specific: FieldFullTextSearchPredicate, to perform full text searches on SqlServer databases which have Full text search enabled. This predicate is not included in the PredicateFactory class.
  • Adapter/SelfServicing: FieldCompareExpressionPredicate. This predicate can formulate field operator value/expression/field or value/expression/field operator field or value/expression/field operator expression/field filters. See the unit tests for ideas. This predicate type is added to the PredicateFactory as well as PredicateFactory.CompareExpression().
  • Adapter/SelfServicing: FieldCompareSetPredicate. This predicate allows you to formulate field operator (subquery) filters. Operator includes IN/comparison operators/EXISTS, ALL/ANY operators and all negative equivalents. Field can contain an expression / aggregate as well which is applied at runtime to the field. Due to the large amount of constructors, this predicate is not available in the PredicateFactory class, as it would result in an enormous amount of code in larger projects.
  • Adapter/SelfServicing: entities can be joined multiple times to a join set. An alias for the entity has to be specified with the specification of the relation when it is added to a RelationCollection (or RelationPredicateBucket). The alias can also be specified with predicate instances to make filters work on a particular instance of the joined entity in the join list.
  • Adapter/SelfServicing: entities can be joined with self. This is the result of the multiple times an entity can be joined to a join set. This also has resulted in more relations in the generated code: relations with self are now generated into the code.
  • Adapter/SelfServicing: Relations can now be set to weak/strong when they're added, for more fine grained control over what to use: left/right/inner joins.
  • Adapter/SelfServicing: Support for Right joins. (this is transparent to the developer) Changed

  • Adapter: When a new entity is saved and the entity has a sequenced PK field and the entity isn't refetched, the new value for the PK is retrievable, despite the fact that the entity itself is marked OutOfSync.

  • Adapter/SelfServicing: For non-new entities: when a field is set to the value the field already has, the field is not marked changed if the field wasn't marked changed already.
  • Adapter/SelfServicing: All custom exception classes are now derived from ORMException which derives from ApplicationException.
  • Adapter/SelfServicing: PK fields of non-new entities can now be changed to a new value. This is not true for sequenced PK fields, these stay read-only.
  • Adapter/SelfServicing: Like predicates can now do case insensitive comparisons when it is necessary to do so. A case insensitive compare compares the UPPERCASE variant of the field with the pattern specified. Not required for sqlserver, as most sqlserver installations are case insensitive by default. Templates Added

  • SelfServicing: Entity classes now have a flag _MappedFieldOnRelation_ReturnsNewIfNotFound. This flag, default set to true, can be used to signal lazy loading code to return null / Nothing when a related entity is not found in the database (m:1, 1:1 relations). Before, always a new, empty entity was returned when the related entity was not found. The flag is set to true by default to prevent code breakage.

  • SelfServicing: GeneralEntityFactory class, which generates an EntityFactory instance for the entity type specified.
  • SelfServicing: DbUtils now has the property ActualConnectionString, which can be set at runtime to overwrite the connection string to use. This setting is global and is used by all calls in the application.
  • SelfServicing: Stored procedure calls can now be done in an active transaction. Changed

  • SelfServicing: When GetMultiManyToOne() is called with solely null / Nothing values for the related entities, GetMulti() is called instead.

  • Adapter/SelfServicing: RelationsetFields is updated to support aliases for fields and entities as well as aggregates and expressions.
  • Adapter: DataAccessAdapter methods which call stored procedures are made virtual.
  • SelfServicing:_entity_Factory.Create()'s internal contents is now an included template. This opens the door for more customized instantiation of entities during multi-entity fetches.
  • Adapter/SelfServicing: Typed lists / typed views now return the default value for the type of the field if that field's value is NULL
  • Adapter/SelfServicing: When an FK field is set to a different value, the referenced entity by that FK value is set to null/Nothing
Frans Bouma | Lead developer LLBLGen Pro