-
Notifications
You must be signed in to change notification settings - Fork 21
Release Notes
- Fixed calling nested predicated LINQ calls (First, Count, etc) doesn't work if the inner call hangs off an implicit join. e.g. objs.First(c => c.InnerObjects.Count(d => true) > 0)
- Fixed potential race condition in DefaultSqlDataTypeProvider if multiple threads try to get a SqlDataType for an enum or blob.
- Fixed contains or any call within another predicate-call (any, first, single, etc) not always working.
- Added DataAccessObjects.GetReference(LambdaExpression) method.
- Fixed dereferencing RelatedDataAccessObjects properties on predicated deflated references not working if the predicate contains reducible client side values such as calls to list.Contains where list is a client side literal. -Fixed accessing a RelatedDataAccessObjects property from a PredicatedDeflatedReference sometimes fails
- Allow importing of deflated reference into current scope
- Fixed Count with Distinct (outside of an aggregate) sometimes producing invalid SQL.
- Fixed SQL Server unique index null handling ANSI compliance shouldn't include primary keys because they're not nullable.
- Fixed SQL Server unique index null handling ANSI compliance not always inserting index filter for null checks on columns foreign key columns.
-
Fixed bool properties not being handled like other types when excluding a property from an index to support null-ansi-compliance.
-
Ignore non-nullable columns when injecting conditions to exclude null values from a unique index in SQL server (for null-ansi-compliance).
- SQL Server provider null-ansi-compliance support whereby null values are excluded from unique indexes by means of a check for not null now excludes this check for properties that are explicitly referenced within the user-defined index condition (if a user-defined index condition is specified).
- Fixed SizeConstraintAttribute placed direectly on an enum type doesn't get inherited by properties of that enum type if the property is nullable.
- Fixed NamingTransformsConfiguration.UniqueIndexConstraintName should default to using NamingTransformsConfiguration.IndexConstraintName before falling to default.
- Support defining naming transform for unique indexes (NamingTransformsConfiguration.UniqueIndexConstraintName).
- Added IndexNamesShouldIncludeIncludedProperties option to allow including the names of IncludeOnly properties in the name of indexes.
- Fix expressions (IndexAttribute.Condition, ComputedMember.GetExpression, ComputedMember.SetExpression) throwing exception when trying to call methods with overloads.
- Better support for parsing IndexAttribute.Condition, ComputedMemberAttribute.GetExpression, ComputedMemberAttribute.SetExpression
- Fix IndexAttribute.Condition not included in schema if index is applied at the class level
- Fix GetReference sometimes not working between different types that use the same primary key type.
- Major bug fix release
- Better support for conditions and and selects involving aggregate calls on recursively related objects projected off recursively related object collections
- Fixed some object sometimes returned multiple times if using Include() with related object collections
- Fixed sometimes less objects than expected are returned when Skip/Take is used in combination with Include() with related object collections
- General improvements to Include() support
- Added overloads to RelatedDataAccessObjects.Items() method - support loading from a new query if eager loaded items aren't available
28 July 2018
- Major bug fix release
- Better support for conditions and and selects involving aggregate calls on recursively related objects projected off recursively related object collections
- Fixed some object sometimes returned multiple times if using Include() with related object collections
- Fixed sometimes less objects than expected are returned when Skip/Take is used in combination with Include() with related object collections
- General improvements to Include() support
- Added overloads to RelatedDataAccessObjects.Items() method - support loading from a new query if eager loaded items aren't available
- Support adding SizeConstraints directly on enums as defaults for properties of that enum type
- Support multiple sed-style transforms within NamingTransformsConfiguration configs by using semicolons to separate s-commands.
- Support for non-abstract DataAccessModel definitions and support for getters on RelatedDataAccessObjects properties
- NamingTransformsConfiguration for Index, ForeignKey, PrimaryKey and DefaultValue constraint names now only apply if a non-empty name is not defined by the user otherwise the user-provided name is left-as-is
- DefaultDefaultValueConstraintName now uses def_ prefix rather than _def suffix
- Added support for easier direct SQL execution via Shaolinq.DirectAccess.Sql.DataAccessModelExtensions
- Added support for declaring indexes at the class level rather than property level to make it less verbose to declare composite indexes
- Switch to semantic versioning
- Optimisations in Commit
- Expose exception information (if any) in DataAccessModelHookSubmitContext
- Fix bug where default value of non-server-side-generated primary keys is not set
- Fix NullReferenceExceptions sometimes get raised from
FormatCommandwhen there is a server side exception
- Support async
IDataAccessModelHook. Breaking change as you must implement both async and sync callbacks - Remove support for using
Includedirectly on DataAccessObject (use standardIncludeonIQueryable)
- Fixed bug 'Invalid attempt to Read when reader is closed' bug when using MySQL 6.10 connector
- Added support for SQL Server on Linux
- Fixed IDataAccessModelHook.Read(DataAccessObject) not working
- Detailed exception message when ValueRequired and DefaultValue attributes are used on the same property.
- Fix ValueRequiredAttribute on non-nullable properties should prevent default value constraints from being outputted on the corresponding column.
- Updated package dependencies
- DataAccessModelConfiguration.ValueTypesAutoImplicitDefault no longer has an effect on nullable value types attributed with ValueRequired. Nullable value types now treated like reference types when applying SQL semantics.
- Support using DateTime properties (Year, Month, Day etc) on user defined types that are convertible to DateTime
- SQL Server: Support server side DateTime Year, Month, Day, Hour etc properties
- Fixed property default value value sometimes not being outputted in SQL DDL even though DataAccessModelConfiguration.HasExplicitDefaultValue is set to true
- Fix symbol packages
- Fixed support for implicit joins used within OrderBy and ThenBy selectors
- Minor bug fixes
- Added Import methods to DataAccessScope.
- Generated assemblies now are attributed with the GeneratedAssemblyAttribute to indicate they are generated by Shaolinq.
- DataAccessModelAssemblyBuilder now invalidates cached assembly if any referenced assembly versions have changed.
- Minor performance improvements
- Added DateTimeKind option to Sqlite provider
- Minor bug fixes
- Minor fixes to implicit joins when accessing DAO persisted members via an generic type with an interface constraint
- Support custom types that are convertible to Shaolinq integral types
- Added InterfaceAccessNormalizer to fix problem referencing implicitly included objects via an interface type (directly or via a constrained generic type) instead of via the actual DataAccessObject type
- Added support for server-side DateTime.AddYears
- Added support for specifying custom SqlDataTypeProvider via SqlDataTypeProvider.SqlDataTypeProvider
- Added support for defining additional SqlDataTypes on the default provider by configuring SqlDatabaseContextInfo.SqlDataTypes
@ 1.3.0.1141
- Throw UniqueConstraintException for both unique constraints and unique index errors in SQL provider (was only handling constraints and not indexes)
- Better support for explicit ConnectionStrings in SQLite provider
- Improved generated assembly caching
- Added better expression parsing support for ComputedMember and IndexAttribute.Condition.
- Improved clustered index support in SQL Server
- Fixed reflection emit error when outputting default decimal values
- Support conditional/partial indexes using IndexAttribute.Condition
- Added IDataAccessModelHook.CreateGuid overload that takes PropertyDescriptor
- New DataAccessModelConfiguration AlwaysSubmitDefaultValues setting
- Add support for DataAccessModel hooks
- Support Configuration option ValueTypesAutoImplicitDefault value type so they don't get given default values on instantiation of the parent DAO unless a value is specified using DefaultValueAttribute. Attempts to commit incomplete objects result in a MissingPropertyValueException.
- Fixed bug where including properties using a lambda over a generic type class or function type fails
- Support explicit naming of foreign keys via NamingTransformsConfiguration
- Support explicit naming of primary keys via NamingTransformsConfiguration
- SqlServerProvider: Don't add NOT NULL conditions on index columns if index is not unique
- Support disabling foreign key constraints on DAO properties and BackReferences via ForeignObjectConstraintAttribute.Disabled
- Added UniqueNullIndexAnsiComplianceFixerClassicBehaviour
- Improved performance DataAccessModel.BuildDataAccessModel(Type)
- Added better support for explicitly setting identity columns.
- Added AutoIncrementAttribute.ValidateExpression support allowing declarative skipping of autoincrement values.
- Fix bug where TransactionContext for null transactions (before most outer DataAccessScope) could be replaced with TransactionContexts from inner scopes.
- Various other transaction and async related fixes
- Fix ambient TransactionContext sometimes not being disposed (like on initialisation of DataAccessModel)
- Changed TransactionContext to have to be acquired in a using statement in order to be created. Transactioncontext.GetCurrent() will only return non-null if there is already a current transaction. Fixes leaky ambient DataAccessObjectDataContexts.
- RewriteAsync now validates manually written async methods to make sure they're not calling sync methods when async equivalents are available.
- RewriteAsync now supports searching all types for a matching extension method that can be used for async (rather than just the type that defined the non-async method).
- Added more connection configuration properties to Postgres (KeepAlive, others)
- AsyncRewriter improvements
- Fixed InvalidCastException when saving a property using a predicated deflated references where the referenced type is not the same as the property container type.
- Fixed OrderBy sometimes ignored with some queries (e.g. GroupBy)
- Added SumAsync(selector) method for decimal and decimal?
- Fix potential exception when projecting structs
- Fixed potential memory leak when querying with similarly structured queries with different constant values
- Fixed ForUpdate not working when using Aggregates after ForUpdate is applied
- Added SumAsync(Decimal) support
- Fixed exception when using Enums with no declared values
- Fixed Insert/Update of predicated deflated references
- [BREAKING_CHANGE] Changed handling of value type properties so that they don't get given default values on instantiation of the parent DAO unless a value is specified using DefaultValueAttribute. Attempts to commit incomplete objects result in a MissingPropertyValueException.
- Fixed bug where including properties using a lambda over a generic type class or function type fails
- Support explicit naming of foreign keys via NamingTransformsConfiguration
- Support explicit naming of primary keys via NamingTransformsConfiguration
- SqlServerProvider: Don't add NOT NULL conditions on index columns if index is not unique
- Support disabling foreign key constraints on DAO properties and BackReferences via ForeignObjectConstraintAttribute.Disabled
- Added UniqueNullIndexAnsiComplianceFixerClassicBehaviour
- Improved performance DataAccessModel.BuildDataAccessModel(Type)
- Added better support for explicitly setting identity columns.
- Added AutoIncrementAttribute.ValidateExpression support allowing declarative skipping of autoincrement values.
- Fix bug where TransactionContext for null transactions (before most outer DataAccessScope) could be replaced with TransactionContexts from inner scopes.
- Various other transaction and async related fixes
- Fix ambient TransactionContext sometimes not being disposed (like on initialisation of DataAccessModel)
- Changed TransactionContext to have to be acquired in a using statement in order to be created. Transactioncontext.GetCurrent() will only return non-null if there is already a current transaction. Fixes leaky ambient DataAccessObjectDataContexts.
- RewriteAsync now validates manually written async methods to make sure they're not calling sync methods when async equivalents are available.
- RewriteAsync now supports searching all types for a matching extension method that can be used for async (rather than just the type that defined the non-async method).
- Added more connection configuration properties to Postgres (KeepAlive, others)
-- Previous --
- AsyncRewriter improvements
- Fixed InvalidCastException when saving a property using a predicated deflated references where the referenced type is not the same as the property container type.
- Fixed OrderBy sometimes ignored with some queries (e.g. GroupBy)
- Added SumAsync(selector) method for decimal and decimal?
- Fix potential exception when projecting structs
- Fixed potential memory leak when querying with similarly structured queries with different constant values
- Fixed ForUpdate not working when using Aggregates after ForUpdate is applied
- Added SumAsync(Decimal) support
- Fixed exception when using Enums with no declared values
- Fixed Insert/Update of predicated deflated references
- Fix DefaultIfEmpty() not returning singleton list for when DefaultIfEmpty is the final expression in a query (as opposed to a join or aggregate call being the last)
- Bug fixes to nested orderby/groupby queries being incorrectly optimised in some cases
- ComputedExpressions support referencing types without namespaces if they are specified as referenced types in config
- Fix combined DISTINCT TOP/TAKE support for SQL Server
- Support DeflatedPredicated references including single trip updates and referencing of such objects.
- New Roslyn based generation of SqlExpressionComparer and SqlExpressionHasher.
- Support ProjectionExpression caching
- Fixed bug where ToListAsync() would erase any included collections on return
- Support UNION and UNION ALL support (Queryable.Union and Queryable.Concat)
- Removed requirement for DataAccessObjects and PersistedMembers to be abstract
- ComputedMember language/parser improvements
- Added support for Queryable.All queries
- Added async versions of Queryable.Any and Queryable.All queries
- Added predicate versions of Single, SingleOrDefault, First, FirstOrDefault
- Support Delete and Delete(predicate) on all compatible Queryables (not just DataAccessObjects)
- Support GetReference on objects where primary key values are provided using related computed member values
- Added SumAsync, AverageAsync, MinAsync, MaxAsync methods
- Better async support when using DataAccessScope
- Better support for CompleteAsync
- Functional async support for Postgres
- Using AsyncRewriter to generate async methods
- Fixed some nested projection with GroupBy bugs
- Added DataAccessScope for async commit support
- Support Include on collections without TransactionScope
- Lots of Include collection fixes
- Support joins with multiple join conditions using anonymous types either side of join 'equals'
- Fixed memory leaks related to lambda projector cache
- Full support for using Include() on RelatedDataAccessObject properties (collections) including recursive Includes within the collection values.
- Better/more-complete support for GroupJoins
- Support for SelectMany returning RelatedDataAccessObjects (Queryable) collections
- Much improved support/implementation for aggregates and DefaultIfEmpty
- Improved GroupBy and nested select/projection query support
- Support implicit joins in many more places that take selectors/predicates such as Queryable.First, Queryable.Single, Queryable.Min, Queryable.Max, Queryable.Count etc.
- Support join conditions that require implicit joins to resolve
- Support DataAccessObjects with custom primary keys (inherited from Shaolinq.DataAccessObject instead of Shaolinq.DataAccessObject{T})
- Support SelectForUpdate, WhereForUpdate on IQueryable
- Fixed deadlocks in some async calls
- Fixed inline call to a function returning IQueryable inside a query sometimes fails
- TransactionContext optimisations
- Fixed compiled projector lambda cache sometimes not caching due to a bug in SqlExpressionComparer
- Various async fixes
- Added NamingTransforms to DataAccessModelConfiguration
- Fix objects with DAO primary keys using references and anonymous types
- Better in-scope object caching performance
- DAO primary keys mostly working with tests
- Better in-scope object caching performance
- Changed SQL Server string support to use NVARCHAR. Added 'max' CHAR and VARCHAR support
- Fix ExpressionInterpreter handling of ConvertExpression
- Better join support
- Fixed blob (byte[]) support
- Removed dependency on log4net
- Better join/groupjoin support
- Removed need for Shaolinq.Postgres.Shared assembly
- Various other fixes
- Made ConnectionTimeout and CommandTimeout optional (uses defaults)
- Added BackendTimeouts option for Postgres provider
- Improved performance dramatically by replacing LambdaExpression.Compile with new interpreter and caching compiler
- Fixed bugs with nullable enums with VS2015 compiler
Previous Versions:
-
Fixed bug when using pure interface DataModels and DataAccessObjects
-
Add support for using Equals, ReferenceEquals and CompareTo rather than == operator.
-
Support AutoIncrement on non-primary key properties
-
Support unordered object commits (without the need for explicit flushes) when using databases that don't support for deferrability
-
Allow direct configuration with connection strings
-
Fixed sometimes queries failing if referencing a primary key on a DAO property
-
Fixed Any function sometimes not working
-
Allow DAO types to be defined in other assemblies
-
SQL server provider now always disables enlistment
-
Switch to using ConfigurationManager for configs
-
Added TransactionScopeFactory
-
Removed dependency on EF
-
Support for ConnectionString rather than pure object or XML configuration
-
Added Azure friendly DeleteDatabaseDropsTablesOnly option for SqlServer
-
Added Azure friendly DisabledForeignKeyContext
-
Support OrderBy in sub-queries on SQL server
-
Support for projecting IGrouping when aggregates are both used and not used.
-
Added support for Queryable.Any
-
Simplified ObjectState logic
-
Fixed bug to do with OrderBy and GroupBy in the same query
-
Fixed GroupBy aggregate bug
-
Better support for booleans and decimals in SQL Server
-
Fixed setting null on deflated object properties doesn't the commit update to the DB.
-
Fixed some sometimes unnecessary UPDATE statements executed following INSERT.
-
Fixed left/right joins using DefaultIfEmpty ignored/swallowed in Mono.
-
Fixed implicit joins in selects sometimes not working when working with explicit Linq joins.
-
Native TimeSpan (interval) support for Postgres providers.
-
Fixed negate (-ve) operation not support in Sql92QueryFormatter
-
Fixed nullable enums on Postgres
-
Added DateTime.Add method support.
-
Fixed comparing DAOs and DAO properties to null sometimes not working.
-
Improved Include() support. Can now include off DAOs that are on projected anonymous types.
-
Added base non-generic DataAccessObject class.
-
Added ObjectAlreadyExistsException for more specific UniqueConstraintException cases.
-
OrderBy and GroupBy now support properties that are are defined on related objects (joins are made automatically/implicitly)
-
Better unified cross-provider exceptions for failed unique constraints and when setting related objects that are missing or undefined objects
-
Fixed implicit join in Where lost when a Select follow.
-
Sqlite provider now converts composite primary keys with more than one auto-increment to a single primary key with a unique constraint across all the composites.
-
DataAccessObjects now has GetReference
-
DataAccessObjects GetByPrimaryKey and GetManyByPrimaryKey now support composite and complex primary keys
-
Support for Include() inside select and on IQueryable.
-
Support for Include() when selecting related objects on objects.
-
Improved composite GetByPrimaryKey support in DataAccessObjects collections.
-
Support recursive Include()
-
Support implicit (recursive) joins when predicating or selecting on related objects
-
Composite primary keys made up of objects are now supported.
-
Improved performance
-
Fixed non-aggregate count. Now uses EXISTS where possible
Copyright (c) 2018 Thong Nguyen (tumtumtum@gmail.com)