Build 5.5.1 ============================= Release notes - NHibernate - Version 5.5.1 3 issues were resolved in this release. ** Bug * #3465 Invalid SQL created for some joins in a subquery ** Task * #3509 Release 5.5.1 * #3508 Merge 5.4.8 into 5.5.x Build 5.5.0 ============================= Release notes - NHibernate - Version 5.5.0 ##### Possible Breaking Changes ##### * `Object.Finalize` is no more proxified when the entity base class has a destructor. See #3205. * Default not-found behavior now works correctly on many-to-many Criteria fetch. It now throws ObjectNotFoundException exception for not found records. See #2687. 62 issues were resolved in this release. ** Bug * #3413 Downgrade dependency System.Data.SQLite.Core 1.0.118 -> 1.0.117 * #3406 Fix orphan removal for detached one-to-one * #3392 Partial fix fetching lazy property after Select in Linq * #3360 Incorrect parameter length for char types in MicrosoftDataSqlClientDriver * #3334 Exception executing HQL query with uncorrelated left joins in subselect * #3327 HqlParser does not correctly negate EXISTS-nodes below an AND/OR * #3325 Cascading orphan delete may not work on versioned entity * #3311 NamedQuery ignores and any other * #3264 Fix collection filter on subclass columns * #3256 Invalid SQL is generated for string Enum used in conditional LINQ * #3205 `Object.Finalize` should not be proxiable * #2687 Use table group joins for many-to-many in Criteria and Entity loaders * #1267 NH-3047 - Lazy=no-proxy ignores join fetch ** New Feature * #3242 Linq: add enum Equals and object Equals support * #3165 Add support for Firebird 4 * #829 NH-3365 - Support for HasFlag method for enums with Flags attribute applied ** Improvement * #3429 Explicit how to use advanced Redis strategies * #3410 Remove redundant collection BeforeAssemble call from query cache * #3398 Do not store mapping field in Configuration * #3396 Get rid of select queries for each ManyToMany not found ignored element in Criteria and lazy loading * #3395 Remove ConstantConverter * #3394 Get rid of select queries for each ManyToMany not found ignored element in hql * #3390 Enable Not node handling in HqlParser.NegateNode * #3384 Improve path rule handling with reserved words in Hql.g * #3377 Move HqlToken.PossibleId to HqlParser.IsPossibleId method and remove castings * #3374 Simplify aggregateDistinctAll rule in Hql.g * #3373 Refactor sequential select related members in AbstractEntityPersister * #3341 Apply fromFragment processing only when required in ProcessDynamicFilterParameters * #3340 SqlString.Trim should return the same instance for not modified string * #3253 Do not throw for unknown type in hql case node * #3230 Add cached boxed boolean values to BooleanType * #3209 Allow custom query loader ** Task * #3460 Merge 5.4.7 in master * #3445 Release 5.5.0 * #3440 Update NUnit to v3.14.0 * #3423 Update actions/checkout action to v4 * #3420 Merge 5.4.6 in master * #3411 Remove ISessionFactoryImplementor parameter from TableGroupJoinHelper * #3409 Merge 5.4.5 in master * #3387 Merge 5.4.4 in master * #3379 Remove NHibernate.Example.Web project * #3362 Update dependency NUnit3TestAdapter to v4.5.0 * #3361 Update dependency NUnit.Console to v3.16.3 * #3353 Migrate renovate config * #3351 Merge 5.4.3 in master * #3284 Update NHibernate.Caches to v5.9.0 * #3283 Update dependency NSubstitute to v5 * #3280 Add tests for Microsoft.Data.SqlClient driver * #3275 Migrate dev packages to Cloudsmith * #3241 Exclude generated files from Deepsource analisys * #3236 Add MySQL8Dialect and MySQL8InnoDBDialect * #3223 Simplify GitHub Actions Tests DB initialization * #3206 Update actions/setup-dotnet action to v3 * #3202 Update dependency Npgsql to v7 * #3129 [Security] Update Oracle.ManagedDataAccess * #3122 Update dependency FirebirdSql.Data.FirebirdClient to v9 * #3102 Update dependency Microsoft.Data.SqlClient to v3.1.3 * #3099 [Security] Update dependency System.Linq.Dynamic.Core to v1.3.3 * #3098 Update dependency System.Data.SQLite.Core to v1.0.118 * #3092 Update dependency Microsoft.AspNetCore.OData to v7.7.0 * #3088 Update NUnit to v3.13.3 ** Tests * #3412 Revive hql ParsingFixture Build 5.4.8 ============================= Release notes - NHibernate - Version 5.4.8 2 issues were resolved in this release. ** Bug * #3489 Inserting multiple associations of the same entity fails ** Task * #3507 Release 5.4.8 Build 5.4.7 ============================= Release notes - NHibernate - Version 5.4.7 3 issues were resolved in this release. ** Task * #3459 Release 5.4.7 * #3458 Merge 5.3.20 into 5.4.x * #3453 Migrate appveyor build to MySql 8 Build 5.4.6 ============================= Release notes - NHibernate - Version 5.4.6 2 issues were resolved in this release. ** Bug * #3414 Reenable use of SelectClauseVisitor for subqueries ** Task * #3419 Release 5.4.6 Build 5.4.5 ============================= Release notes - NHibernate - Version 5.4.5 2 issues were resolved in this release. ** Task * #3408 Release 5.4.5 * #3407 Merge 5.3.19 in 5.4.x Build 5.4.4 ============================= Release notes - NHibernate - Version 5.4.4 6 issues were resolved in this release. ** Bug * #3359 2nd level cache GetMany ineffective for collections * #3354 Invalid program generated by FieldInterceptorProxyBuilder for indexer property getter * #3352 Fetch throws "could not resolve property" error for a property that is not mapped ** Improvement * #3368 Allow internal entity classes/interfaces in .NET Standard 2.0 for field interceptor ** Task * #3386 Release 5.4.4 * #3367 Update readme with actual dev build information for 5.4 Build 5.4.3 ============================= Release notes - NHibernate - Version 5.4.3 11 issues were resolved in this release. ** Bug * #3317 Issue with components list lazy loading with not lazy association * #3307 IsDirty performance hit since 5.4.0 * #3295 C# 8/11 Static interface members support * #3291 Npgsql 6+ issues with null DateTime parameter types * #3290 Incorrect fetch of Many-to-Many relation * #3289 Fetching lazy loaded component causes n + 1 query when querying a subclass abstraction * #3288 NullReferenceException is thrown when using Fetch ** Task * #3349 Release 5.4.3 * #3348 Merge 5.3.18 in 5.4.x * #3318 Merge 5.3.17 in 5.4.x * #3302 Upgrade NUnit3TestAdapter to fix "Unknown framework version 7.0" Build 5.4.2 ============================= Release notes - NHibernate - Version 5.4.2 6 issues were resolved in this release. ** Bug * #3274 Improve LINQ Contains subquery parameter detection * #3271 LINQ subqueries wrongly altered by SelectClauseVisitor * #3263 Wrong alias in Where clause if using Fetch and scalar Select * #3239 Incorrect SQL generated fetching many-to-many with subclasses ** New Feature * #3251 MappingByCode: Support backfield property access ** Task * #3281 Merge 5.3.16 in 5.4.x * #3277 Release 5.4.2 Build 5.4.1 ============================= Release notes - NHibernate - Version 5.4.1 5 issues were resolved in this release. ** Bug * #3216 Enable one-to-one optimistic lock handling in mapping * #3215 Count(Distinct ...) does not work * #3203 Fix a wrong example in configuration documentation ** Task * #3232 Release 5.4.1 * #3227 Merge 5.3.15 in 5.4.x As part of releasing 5.4.1, a missing 5.4.0 possible breaking change has been added, about one-to-one associations and optimistic locking. See 5.4.0 possible breaking changes. Build 5.4.0 ============================= Release notes - NHibernate - Version 5.4.0 ** Highlights * NHibernate has gained three new target frameworks: .Net 6, .Net Framework 4.8 and .Net Standard 2.1. NHibernate NuGet package provides them, along with the older targets, .Net Core 2.0, .Net Framework 4.6.1 and .Net Standard 2.0. These new targets allow some NHibernate optimizations for applications using them. The same limitations apply for .Net 6 and .Net Standard 2.1 as for .Net Core 2.0 and .Net Standard 2.0, see NHibernate 5.1.0 release notes. * A new batching strategy is available, minimizing the batching memory footprint. See #2959. Using it may increase CPU usage. * 201 issues were resolved in this release. ##### Possible Breaking Changes ##### * One-to-one changes does now trigger a version increment, consistently with the default behavior of other kinds of associations. See #3204. * Linq and criteria queries on unmapped entities will throw instead of returning an empty result list. See #1106, #1095. * The second level cache UpdateTimestampsCache does not use locks anymore. This may slightly increase the number of cases where stale data is returned by the query cache. See #2742. * Equality and hashcode access on uninitialized persistent collections will no more trigger their loading. See #2461. * DB2CoreDriver now uses named parameters instead of positional ones. See #2546. ** Bug * #3198 EntityUpdateAction increments version despite veto on update * #3189 Support proxies of classes with init properties * #3188 No way of detecting if AutoFlush performed in added AutoFlushEventListener * #3176 Cached entity always fetches lazy properties with read-write concurrency strategy * #3156 Evaluation failure when using `Nullable` without a value in LINQ * #3150 LINQ query dynamic component by interface hangs the application * #3109 Fix table group join issue with subclasses * #3104 Inner Join fails with left Outer Join when referenced in Where clause * #3076 Nested group by results in "A recognition error occured" * #2968 Fix QueryStatistics.ExecutionAvgTime calculation * #2827 Fix BadImageFormatException in dynamic proxies for abstract classes and interfaces * #2822 "A recognition error ocurred" querying by a nullable component with more than N properties * #2758 Fix AmbiguousMatchException in ClearPool with FirebirdClient 6.6.0 and above * #2750 Using System.Transaction with IStatelessSession doesn't always flush batches to database * #2738 Unused Left Join in LINQ throws exception * #2717 MappingByCode discriminator column with string type throws exception * #2675 Fix collection lazy loading with composite keys on subclass columns * #2672 Linq query failure with left joins * #2619 InvalidOperationException in ProxyGenerator for class with generic non-virtual method * #2614 Obvious bug in two HQLQueryPlan classes with distinction Set * #2594 Wrong SQL produced by DML LINQ when using a select clause for a property referencing the outer select * #2555 Add spaces around concat operator * #2552 One-to-one second level cache issue * #2548 Mark DB2Dialect as not supporting null columns in unique constraint * #2547 Fix paging in DB2Dialect * #2540 Unable to use external predicate in subquery * #2534 Fix asymmetrical SqlType.Equals * #2454 ConditionalProjection containing the correlation to outer query fails to determine projection type * #2330 join on multiple conditions * #2201 Fetch Join generates incorrect SQL joins for the same entity type * #2092 Projection and join fetch in hql leads to duplicated column aliases * #1365 NH-3288 - Stale data checking does not work for one-to-one associations * #1349 NH-3893 - HQL parse error of a query with 'left' or 'right' function * #1326 NH-3622 - Fetching in query causes incorrect/missing joins in subquery * #1316 NH-3530 - memory when using default_batch_fetch_size * #1235 NH-2785 - StaleStateExceptions discarded on optional table * #1215 NH-2208 - Error with filters on joined-subclass as many-to-one * #1209 NH-2049 - Error with filters on joined-subclass as one-to-one * #1180 NH-3847 - ConditionalProjection throws "Both true and false projections must return the same types" when the types are the same * #1106 NH-2978 - LINQ: Queries for unmapped entity types return empty result set * #1075 NH-2239 - Wrong OrderBy in generated SQL when using ICriteria, Eager fetching and order by clauses in collection mappings * #1072 NH-2174 - Invalid SQL is generated for OneToMany collections * #1062 NH-1893 - Trigger-Identity with Dynamic Insert throws ORA-01036 (10g) ** New Feature * #2959 Support Dynamic BatchFetchStyle * #2744 Set which entities classes should never be cached, even indirectly * #2737 Add more left join support * #2645 Allow specifying the size of the query plan cache * #2641 Avoid InvalidCastException with Oracle number high precision values * #2551 Add support for joining a subquery in hql * #2545 Table group joins for subclasses in Criteria * #2486 Add Projections.Select in Criteria * #2361 Table group joins support in hql ** Improvement * #3184 Support caching queries with autodiscovered types * #3177 Disable default caching in tests * #3160 Allow internal entity classess/interfaces in .NET Standard 2.0 * #3133 Automatically generate async code on pull request * #3127 Register IType CLR types as aliases * #3116 Simplify SqlGenerator.FromFragmentSeparator * #3114 Exclude generated async files from Deepsource analysis * #3106 Skip table group join processing for implicit join * #3091 Use GitReleaseManager dotnet tool * #3083 Update SHFB in order to build documentation without MSBuild * #3050 Add .NET Standard 2.1 target * #3027 Avoid allocations on lock in SyncCacheLock * #3000 Add .NET 6 and .NET Framework 4.8 targets * #2990 Use inner join instead of implicit join for implied entity joins * #2957 Avoid lambda compilation as much as possible * #2948 Avoid lambda compilation for member access expressions in LINQ * #2947 LINQ queries triggers JIT a bit too much * #2920 Add parameter type to ADO exception * #2804 Projections.Conditional for CASE expressions with multiple conditions * #2752 Change cascade style for DefaultDirtyCheckEventListener to persist to avoid flushing the session * #2742 Remove locks from UpdateTimestampsCache * #2723 Avoid double param type guessing and better NULL parameter handling in LINQ * #2706 Set the rolledBack flag when disposing active transactions * #2700 Potential improvement to AliasToBeanResultTransformer * #2621 Regression bug with enums used as parameter for string column * #2571 Default value for CancellationToken in IQueryBatch.GetResultAsync * #2568 Support internal entity classes by proxy factory * #2556 Register right function for Firebird and PostgreSQL * #2546 Enable named parameters on DB2CoreDriver * #2539 Skip no longer needed moving ON condition to Where clause in LINQ * #2538 Remove no longer needed alias substitution for filtered many-to-many collection in hql * #2518 Support Aggregate subqueries with paging on MS SQL Server * #2510 Remove OrderByClause from query models with Contains, All and Any result operators * #2492 Replace casting with NodeType checks in Criteria ExpressionProcessor * #2479 When using a paged sub-query in Linq, generates incorrect SQL * #2461 Remove persistent collections Equals/GetHashCode overrides * #2460 Simplify single alias retrieval for SimpleProjections * #2448 Avoid lambda compilation for constant and member access expressions in Criteria * #1285 NH-3249 - Cannot perform HQL with "COUNT(DISTINCT Date(s.Date))" * #1244 NH-2868 - Generate method of ForeignGenerator fails with stateless sessions * #1095 NH-2829 - QueryOver/Criteria should throw exception when querying against unmapped class * #871 NH-3115 - Should de-duplicate joins when using fetching with where in LINQ query * #869 NH-2952 - Setting the SqlCheck is not supported in the ByCode mapping * #809 NH-2799 - Provide the CancelQuery() method in IStatelessSession * #766 NH-3813 - Eager fetch on key-many-to-one relation adds inner joins to the query * #715 NH-1040 - property-ref on joined-subclasses should work or error ** Task * #3197 Update dependency System.Data.SqlClient to v4.8.5 * #3195 Release NHibernate 5.4 * #3161 Tell NuGet about the readme file * #3147 Add `datetimex` keyword to SapSQLAnywhere17Dialect * #3146 Run tests against Oracle XE 21c * #3123 Update dependency Npgsql to v6 * #3121 Update dependency Microsoft.NETFramework.ReferenceAssemblies to v1.0.3 * #3119 Update actions/setup-dotnet action to v2 * #3118 Update actions/checkout action to v3 * #3117 Update dependency NSubstitute to v4.4.0 * #3111 Update dependency log4net to v2.0.15 * #3080 Replace Dependabot with Renovate * #3063 Bump Oracle.ManagedDataAccess from 19.12.0 to 21.6.1 * #3061 Bump Oracle.ManagedDataAccess.Core from 2.19.120 to 3.21.61 * #3059 Bump log4net from 2.0.12 to 2.0.14 * #3057 Run tests using .NET 4.8 * #3017 Add deepsource.io code analysis * #3002 Bump NUnit3TestAdapter from 4.1.0 to 4.2.1 * #2987 Disable auto rebasing for depandabot PRs * #2951 Run tests on .NET 6 * #2946 Bump Microsoft.SourceLink.GitHub from 1.0.0 to 1.1.1 * #2936 Bump System.Data.SQLite.Core from 1.0.114.3 to 1.0.115.5 * #2911 Bump System.Data.SqlClient from 4.8.2 to 4.8.3 * #2898 Bump FirebirdSql.Data.FirebirdClient from 6.6.0 to 8.5.2 * #2887 Bump Oracle.ManagedDataAccess from 19.11.0 to 19.12.0 * #2886 Bump Oracle.ManagedDataAccess.Core from 2.19.110 to 2.19.120 * #2878 Bump System.Linq.Dynamic.Core from 1.2.10 to 1.2.12 * #2870 Bump MySql.Data from 8.0.25 to 8.0.26 * #2851 Cache Dialect in tests * #2818 Bump Microsoft.Data.SqlClient from 2.1.3 to 3.0.0 * #2800 Bump System.Data.SQLite.Core from 1.0.113.7 to 1.0.114.2 * #2799 Bump Npgsql from 4.0.3 to 4.1.9 * #2796 Bump System.Linq.Dynamic.Core from 1.2.9 to 1.2.10 * #2790 Bump Microsoft.NET.Test.Sdk from 16.9.4 to 16.10.0 * #2786 Bump Microsoft.Data.SqlClient from 2.1.2 to 2.1.3 * #2771 Bump MySql.Data from 8.0.22 to 8.0.25 * #2770 Bump System.Data.SQLite.Core from 1.0.109.2 to 1.0.113.7 * #2765 Bump Microsoft.NETFramework.ReferenceAssemblies from 1.0.0 to 1.0.2 * #2759 Enable dependabot * #2756 Update dependencies * #2607 Merge 5.3.5 * #2605 Upgrade AsyncGenerator to 0.19.1 * #2593 Merge 5.3.4 * #2582 Remove no longer used code in QueryModelVisitor * #2570 Update Relinq and LinFu links * #2516 Suppress Codefactor single class per file rule for test project * #2501 Upgrade MySql client and remove allowed failures on CI builds ** Tests * #3024 Enable test accessing Component's Parent property in LINQ * #2921 Fix test for SAP SQL Anywhere * #2848 Add Oracle to GitHub Actions * #2541 LINQ SELECT tests with WHERE subquery * #2489 Improve CriteriaAssertFixture * #2456 Test case for #1180 and improve NullableType.ToString * #2242 Test case for NH-3972 - SQL error when selecting a column of a subclass when sibling classes have a column of the same name Build 5.3.20 ============================= Release notes - NHibernate - Version 5.3.20 2 issues were resolved in this release. ** Bug * #3438 DB2/400: ArgumentException Column 'SQL_TYPE_NAME' does not belong to table DataTypes ** Task * #3454 Release 5.3.20 Build 5.3.19 ============================= Release notes - NHibernate - Version 5.3.19 2 issues were resolved in this release. ** Bug * #3397 GenerateSchemaCreationScript creates many identical dialect instances ** Task * #3405 Release 5.3.19 Build 5.3.18 ============================= Release notes - NHibernate - Version 5.3.18 3 issues were resolved in this release. ** Bug * #3333 Lazy property with nosetter accessor remains uninitialized * #3330 Linq with FetchLazyProperties() resets lazy property changes ** Task * #3346 Release 5.3.18 Build 5.3.17 ============================= Release notes - NHibernate - Version 5.3.17 5 issues were resolved in this release. ** Bug * #3306 Invalid SQL when referencing nullable entity in correlated subquery * #3304 Fix SetSnapShot CopyTo variance failure * #3294 Undefined join type failure with cross joins and Informix ** Task * #3315 Release 5.3.17 * #3300 Backport handling of null DateTime parameters in Npgsql 6+ Build 5.3.16 ============================= Release notes - NHibernate - Version 5.3.16 3 issues were resolved in this release. ** Bug * #3269 "Or" clause in a "where" condition returns a wrong result with not-found-ignore * #3210 Wrong name value for L2 read-only cache warning on mutable ** Task * #3276 Release 5.3.16 Build 5.3.15 ============================= Release notes - NHibernate - Version 5.3.15 4 issues were resolved in this release. ** Bug * #3218 Failure of contains subquery with parameter * #3187 Fix mixing implied implicit and left joins in HQL for v5.3 ** Task * #3225 Release 5.3.15 * #3222 Automatically generate async code on pull requests for 5.3 Build 5.3.14 ============================= Release notes - NHibernate - Version 5.3.14 3 issues were resolved in this release. ** Bug * #3169 InvalidOperationException: This transformer is not initialized by Cached Query * #3164 Fetching a lazy loaded component regression ** Task * #3183 Release 5.3.14 Build 5.3.13 ============================= Release notes - NHibernate - Version 5.3.13 6 issues were resolved in this release. ** Bug * #3134 ManyToMany - Tries to select not existing column in Mapping Table * #3113 Join fails on Oracle9Dialect * #3030 Memory leak named parameter holds entity references ** Improvement * #3120 Guards against use of a disposed session factory * #2994 Npgsql 6 is not compatible ** Task * #3145 Release 5.3.13 Build 5.3.12 ============================= Release notes - NHibernate - Version 5.3.12 5 issues were resolved in this release. ** Bug * #3046 Regression for filters on entity joins with many-to-one disabled * #3029 InvalidOperationException on proxies with explicit implementation of a generic method ** Improvement * #3043 Improve exception for query on delayed id ** Test * #3035 Support tests in VS 2022 ** Task * #3044 Release 5.3.12 Build 5.3.11 ============================= Release notes - NHibernate - Version 5.3.11 12 issues were resolved in this release. ** Bug * #3005 LINQ: Casting from object to TimeSpan throws * #2988 Query issues when using not-found='ignore' in entity mapping * #2965 Fix possible issue with logging for Linq Readonly tests * #2963 Time is incompatible with bigint for TimeAsTimeSpanType * #2937 NRE in linq processing of custom components * #2928 Session.Refresh when entity is IFieldInterceptorAccessor throws a MappingException * #2904 SQL query result not retrieved from second level cache * #2876 Schema validation not working with NpgSql v5 * #2862 NHibernate AsyncReaderWriterLock stalls under load * #2727 The session.Load(obj, id) overload can't handle proxies ** Task * #3019 Release 5.3.11 * #2984 Bump AsyncGenerator to 0.18.3 for 5.3 branch with fix for .net 6 Build 5.3.10 ============================= Release notes - NHibernate - Version 5.3.10 11 issues were resolved in this release. ** Bug * #2891 Fix nullable entity comparison with null and implicit/cross joins * #2885 Do not serialize unnecessary members in SessionFactory * #2882 Fix ArgumentNullException when provider is unable to open a connection * #2871 If DbTransaction.Dispose throws an exception, the AdoTransaction is left in an inconsistent state * #2860 Null reference when calling Trim() on interpolated string containing null property * #2858 Casting to object and back to interface in Subquery causes incorrect SQL * #2856 Distinct on Composite User Type property fails * #2855 Error log from ReflectHelper.TypeFromAssembly() on Linq query * #2611 One-to-zero-or-one relation not returning data when checking for null * #1962 Failing Linq query on element index ** Task * #2915 Release 5.3.10 Build 5.3.9 ============================= Release notes - NHibernate - Version 5.3.9 11 issues were resolved in this release. ** Bug * #2835 Fix ExecuteWorkInIsolation ignores MultiTenancy configuration * #2811 Remove session finalizer * #2805 Model not mapped Exception * #2802 ArgumentException on session Flush * #2792 Arithmetic operations adding casts to SQLite that cause incorrect results * #2791 Custom Equality Fails * #2772 LINQ query returns NULL instead of expected result ** Test * #2841 Fix possible test failure for SqlServer 2019 * #2814 Fix intermittent Firebird test errors * #2812 Replace Travis CI with GitHub Actions ** Task * #2837 Release 5.3.9 Build 5.3.8 ============================= Release notes - NHibernate - Version 5.3.8 6 issues were resolved in this release. ** Bug * #2710 Filtered Entity Dml Update Throws Collection was modified * #2708 MappedAs throws when called on a Convert UnaryExpression * #2707 Don't currently support idents of type X * #2673 Exception when using BinaryFormatter to deserialize entities with initialized proxies in associations * #1264 NH-3005 - NHibernate.Hql.Ast.HqlIdent..ctor throws Don't currently support idents of type Date ** Task * #2721 Release 5.3.8 Build 5.3.7 ============================= Release notes - NHibernate - Version 5.3.7 5 issues were resolved in this release. ** Bug * #2704 IEnhancedUserType from string to bool fails in some circumstances * #2702 LINQ projection of nullable enum with list fails * #2693 Invalid parameter conversion with group by * #2688 NoViableAltException in a delete on a many-to-one id ** Task * #2701 Release 5.3.7 Build 5.3.6 ============================= Release notes - NHibernate - Version 5.3.6 12 issues were resolved in this release. ** Bug * #2659 IQueryable filter by subquery gives "Item with Same Key has already been added" * #2649 Invalid parameter conversion for enums mapped in sub-classes * #2646 Invalid generated sql with linq any in select and composite keys * #2642 Linq expression parser removes required Convert nodes * #2631 IndexOutOfRange exception with One-to-One mapping * #2627 Null reference on Merge for detached unsaved entity * #2626 WHERE IN SELECT uses wrong column * #2608 Delay entity insert may fail with Merge * #2544 Recognition error occurs using System.Linq.Queryable.Contains ** Improvement * #2677 Missing ConfigureAwait in FutureEnumerable.GetEnumerableAsync * #2656 Make sure dbcommand is disposed ** Task * #2676 Release 5.3.6 As part of releasing 5.3.6, one missing 5.3.0 possible breaking change has been added, about Merge no more triggering immediate generation of identifier. See 5.3.0 possible breaking changes. Build 5.3.5 ============================= Release notes - NHibernate - Version 5.3.5 2 issues were resolved in this release. ** Bug * #2599 WrongClassException in Linq query ** Task * #2606 Release 5.3.5 Build 5.3.4 ============================= Release notes - NHibernate - Version 5.3.4 6 issues were resolved in this release. ** Bug * #2580 InvalidWithClauseException when join polymorphic entity * #2559 Regression in caching linq query with ThenFetchMany statement. * #2549 ApplyFilter does not work on join statements in LINQ * #2537 Unable to cast "System.Linq.Expressions.UnaryExpression" to "System.Linq.Expressions.LambdaExpression". ** Task * #2578 Add missing possible breaking changes for #2365 * #2587 Release 5.3.4 As part of releasing 5.3.4, one missing 5.3.0 possible breaking change has been added, about custom method generators for Linq. See 5.3.0 possible breaking changes. Build 5.3.3 ============================= Release notes - NHibernate - Version 5.3.3 16 issues were resolved in this release. ** Bug * #2519 Fix parameter caching for Linq provider * #2515 InvalidCastException for Linq query with subquery * #2514 Entity with field interceptor are not correctly passed as Linq parameters * #2512 Linq queries with a condition after a projection on a collection fail * #2511 Linq Fetch over component after fetching a many-to-one throws exception * #2508 OnPreUpdateCollection - Passed entity instance X is not of expected type Y * #2499 Cast operation fails when an enum is mapped as an AnsiString * #2490 Unnecessary cast in sql with Linq are causing performance issues * #2488 Fix parameter detection for Equals and CompareTo methods for Linq provider * #2485 Throw entity not mapped exception for entity join in hql if possible * #2484 Entity Joins are not polymorphic in hql * #2476 Hashset add returns true instead of false * #2474 Fetch all lazy properties when entity is already loaded fails * #2471 AsQueryable() on collection throws if applied after Where statement ** Task * #2482 Add missing possible breaking changes for #2010 * #2527 Release 5.3.3 As part of releasing 5.3.3, two missing 5.3.0 possible breaking changes have been added, about uninitialized extra lazy collections and SQLite schema validation. See 5.3.0 possible breaking changes. Build 5.3.2 ============================= Release notes - NHibernate - Version 5.3.2 6 issues were resolved in this release. ** Bug * #2468 Null reference at NHibernate.Util.AsyncReaderWriterLock.ReadLock() * #2465 Linq contains on a value collection is failing * #2463 Path expected for join * #2458 Evaluatable expressions with parameters are no more pre-evaluated * #2453 Fail to cast enum as nvarchar for Linq Contains ** Task * #2472 Release 5.3.2 Build 5.3.1 ============================= Release notes - NHibernate - Version 5.3.1 7 issues were resolved in this release. ** Bug * #2445 LINQ queries with a cast from int to uint fail * #2440 InvalidCastException for Future Criteria with aliased fetches * #2439 Invalid parameter conversion for enums * #2437 Invalid cast on nullable custom type with Linq ** Task * #2450 Release 5.3.1 * #2436 Fix old http://nhibernate.info URIs * #2435 Fix iconUrl warning Build 5.3.0 ============================= Release notes - NHibernate - Version 5.3.0 220 issues were resolved in this release. ##### Possible Breaking Changes ##### * A distributed cache may hold conflicting timestamps after upgrade for as much as twelve hours. Consider flushing a distributed cache after upgrade to avoid any issue. Do not share a distributed cache with applications using an earlier version of NHibernate. * The counter id generator may generate conflicting ids for as much as twelve hours after upgrade. * `update` and `delete` statements will now take into account any enabled filter on the entities they update or delete, while previously they were ignoring them. (`insert` statements will also take them into account, but previously they were failing instead of ignoring enabled filters.) * ISession.Persist and ISession.Merge will no more trigger immediate generation of identifier. * Bags will no more be loaded with "null" entities, they will be filtered out. * Setting the value of an uninitialized lazy property will no more trigger loading of all the lazy properties of the entity. * If an uninitialized lazy property has got its value set, without any other subsequent lazy property load on the entity, a dynamic update will occur on flush, even if the entity has dynamic updates disabled. This update will occur even if the set value is identical to the currently persisted property value. * Assigning an uninitialized proxy to a `no-proxy` property will no more trigger the proxy initialization. Moreover, reading the property afterwards will no more unwrap the assigned proxy, but will yield it. * A class having an explicitly implemented interface declaring a member with the same name than the class id will have its proxies trigger a lazy load if the interface "id" is accessed. * SQLite: in order to avoid a floating point division bug losing the fractional part, decimal are now stored as `REAL` instead of `NUMERIC`. Both are binary floating point types, excepted that `NUMERIC` stores integral values as `INTEGER`. This change may cause big integral decimal values to lose more precision in SQLite. * SQLite: non supported SQL type names previously used by NHibernate, resulting in unexpected actual typing, have been fixed. This causes databases generated by a previous NHibernate version to fail schema validation by 5.3 or higher versions. See #2507 for more information. * Custom dialects used for databases that do not support cross join will have to override `SupportsCrossJoin` property and set it to `false`. * `VisitorParameters.ConstantToParameterMap` may contain the same parameter for multiple constant expressions. * `ICache` caches yielded by the session factory will be `CacheBase` wrappers around the cache actually provided by the cache provider, if it was not deriving from `CacheBase`. * Calling `IList.RemoveAt` or `IList<>.RemoveAt` on an uninitialized list with a negative number will now throw an `ArgumentOutOfRangeException`. * Calling `IList.RemoveAt` or `IList<>.RemoveAt` on an uninitialized list mapped as `lazy="extra"` with a number that is equal or higher that the current collection size will now throw an `ArgumentOutOfRangeException`. * Calling `IList.Insert` or `IList<>.Insert` on an uninitialized list with a negative number will now throw an `ArgumentOutOfRangeException`. * Calling `IList.Insert` or `IList<>.Insert` on an uninitialized list mapped as `lazy="extra"` with a number that is higher that the current collection size will now throw an `ArgumentOutOfRangeException`. * Getting or setting a value with `IList.this[int index]` or `IList<>.this[int index]` on an uninitialized list with a negative number will now throw an `ArgumentOutOfRangeException`. * Setting a value with `IList.this[int index]` or `IList<>.this[int index]` on an uninitialized list mapped as `lazy="extra"` with a number that is equal or higher that the current collection size will now throw an `ArgumentOutOfRangeException`. * Calling `IDictionary<,>.Add` or `ICollection<>.Add` on an uninitialized map mapped as `lazy="extra"` with a key that already exists will now throw an `ArgumentException`. * Calling `IDictionary<,>.Remove` or `ICollection<>.Remove` on an uninitialized map mapped as `lazy="extra"` with a key that does not exist will now return false. * Map dirtiness is now evaluated by `EqualityComparer.Default` when setting an existing key value with `IDictionary<,>.this[]` on an initialized map. * Calling `ISet<>.Add` on an uninitialized set mapped as `lazy="extra"` with a transient element that already exists in the set will now return false. * Calling `ISet<>.Add` or `ICollection<>.Add` on an uninitialized set mapped as `lazy="true"` with a transient element that does not override `Equals` method will not initialize the collection. * Linq custom generators deriving from `BaseHqlGeneratorForMethod` should override the `TryGetCollectionParameter` method if they have to support parameter lists. ** Bug * #2425 NRE with nullable subselect value in Linq * #2421 Chapter 26: Best Practices, error about identifier recommendations * #2410 Second level cache failures with CoreMemoryCaches * #2380 OData NotSupportedException MemberInit on base class member * #2365 Add Linq parameter type detection * #2346 Fix SQLite typing * #2336 Intermittent null reference exception on CloseConnection * #2324 Update IIsEntityDecider to use ExpressionsHelper.TryGetMappedType * #2319 Upgrade AsyncGenerator to 0.18.1 * #2299 Proper query plan caching for DML LINQ queries * #2286 Wrong sql if used joined-subclass with filters for key columns * #2278 IInterceptor.OnPrepareStatement results not used in insert/update commands * #2266 Fix comment for Restrictions.IsEmpty * #2255 Fix a flaky test * #2245 Add sqlite.binaryguid to configuration schema * #2244 SelectMany Linq extension does not work correctly - subsequent FetchMany fails * #2233 Fix possible issue with async code for delayed entity inserts * #2231 Invalid alias name used in Linq Joins * #2222 NHibernate query plan for Linq Dml is not cached * #2219 Fix BuildTool output path * #2215 Fix ShowBuildMenu.sh * #2181 Skip null entities when bag is populated * #2164 Do not call GC.SuppressFinalize from finalizer thread * #2158 Proper support for IN clause for composite values in Criteria * #2147 Improve async locking * #2144 AdoTransaction memory leak (5.2.5) * #2137 NullReferenceException in EntityEntry.GetLoadedValue on an update of a never loaded detached entity * #2099 "Composite Index" not working with inheritance * #2088 Fix cacheable CreateSQLQuery throws on query with AddJoin * #2085 Duplicated methods generated in proxies * #2067 Wrong proxy built for base class with interfaced sub-classes * #2064 One-to-one properties not appearing in Select() projection result set * #2053 Dml Style Update fails with static where sql in mapping * #2038 Fix a typo on the memcached distributed cache description in the docs * #2029 Incorrect SQL for cast inside an aggregate (MS SQL) * #2019 Update symbol package format and add Sourcelink * #2000 Fixed Equals method for transformers * #1997 Fix criteria collection ordering * #1994 Extra Select for every "outfiltered" Element * #1993 InvalidCastException when merging a collection with a lazy property * #1985 DateTime.xxxx are not supported in SelectGroup * #1965 Fix code sample in docs, section 10.4.2 * #1956 Fix lazy property caching * #1921 DML insert fails when a filter is enabled * #1738 Refresh of locally removed collection item crashes with "instance was not in a valid state" * #1480 Fix cache build for honoring mapped concurrency * #1368 NH-3778 - Crash when performing a Linq query on a one-to-one mapped reference * #1341 NH-3848 - Child collection fetched using left outer join with on clause or where clause restrictions on fetched collection shouldn’t be stored in second level cache. * #1319 NH-3549 - BasicFormatter throws exceptions for certain types of data containing "signal words" * #1312 NH-3493 - Cannot use alias between more than 1 level of nested queries * #1310 NH-3478 - StatefulPersistenceContext.RemoveEntity KeyNotFoundException on Evict * #1309 NH-3469 - Impossible to load one-to-one association with LINQ for composite-id * #1274 NH-3117 - Query on one-to-one property returns incorrect results * #1263 NH-2991 - Criteria withClause doesn't work in case of many to many collections * #1228 NH-2648 - HQL with joins in sub-select creates wrong SQL * #1206 NH-1761 - Criteria query inserts an extra order by expression when using JoinType.LeftOuterJoin and Projections * #1158 NH-3492 - SqlClientBatchingBatcher incorrectly ignoring per-SessionFactory Settings properties * #1128 NH-3210 - NHibernate Linq Provider does cross join or left outer join and not inner join (even if outer-join=false on many-to-one mapping) * #1124 NH-3155 - Linq subquery with group is not supported * #1125 NH-3178 - Exception when using one-to-one properties in a criteria projections * #1117 NH-3079 - Cannot use a sql custom loader with a composite ID * #1107 NH-2983 - Coalesce in projection doesn't work if there is more than 1 Coalesce * #1103 NH-2926 - CriteriaQuery - Unable to sort by composite-id * #1100 NH-2892 - The columns containing reserved words are not quoted * #1059 NH-1001 - Select statement issued for each not-found=ignore * #1047 NH-3865 - Swallowed ArgumentNullException with dynamic composite id * #1015 NH-2951 - Missing alias in hql update (select) statement with joined subclasses * #1006 NH-2714 - Properties mapped inside a group are not set when retrieving object ** New Feature * #2411 Add an option to register a custom pre-transformer for a Linq query * #2392 Add locate support for SQLite * #2362 Add support for lt, gt, le, ge oData operators on strings * #2349 Add support for Oracle binary floating point types * #2347 Support fetching individual lazy properties for Criteria EntityProjection * #2327 Add cross join support for Hql and Linq query provider * #2313 Add overloads to ISession.Get taking both an entityName and a lockMode * #2259 Schema auto-update should throw errors * #2221 Support MemberInit expression in group by * #2216 Add a driver to support Microsoft.Data.SqlClient provider * #2209 IN clause support in hql for composite keys on databases without row value constructor support * #2156 Support basic arithmetic operations (+, -, *, /) in QueryOver * #2135 Support OData GroupBy/Aggregate * #2116 Ability to replace ConfigurationManager with a custom config provider * #2108 Multi-Tenancy: Implement tenant per Database strategy * #2107 Port Hibernate's Aggregate functions for subqueries * #2106 Port Hibernate's support subqueries in HQL as CASE statement alternatives * #2100 Allow to override default types with length or precision parameters * #2097 Add support for fetching an individual lazy property with Criteria * #2090 Add support for caching fetched relations with Criteria * #2080 Add ability to set custom collection type as a string in mapping by code * #2049 Fix property-ref ignoring not-found="exception" mapping * #1949 Port Hibernate's lazy attribute fetch groups * #1922 Add support for fetching an individual lazy property with hql and linq provider * #1861 Lazy loading and Eager initialization for Component * #1376 Composite id is incorrectly expanded in SQL * #1195 NH-4078 - LINQ fetched collections aren't cached * #981 NH-3873 - Explicit joins on unrelated classes * #959 NH-4048 - Support non-deterministic/db-side-only methods in Linq * #896 NH-1432 - Expression.Sql should support aliases other than {alias} ** Improvement * #2404 Allow overriding default CastFunction * #2401 Optimize JoinWalker.WhereString method * #2399 Optimize PersistentGenericBag.EqualsSnapshot * #2394 Optimize PersistentGenericSet snapshot * #2352 Improve performance of ReflectHelper.GetMethod/Definition * #2350 Optimize LINQ batch item processing for queries with overridden result type * #2316 Add multiple arguments support for ISQLFunction * #2315 Add SetFlushMode for QueryOver and Linq * #2295 Optimize filter applying logic * #2287 Allow customizing 'alias to bean' property not found behavior * #2284 Make persistent collection classes implement the IReadOnly* interfaces * #2270 IQueryOver is lacking some options * #2254 Add dev build version suffix * #2249 Improve handling of SqlCeParameter.SqlDbType * #2248 Remove most RemoveAsAliasesFromSql usages * #2241 Avoid duplicating parameters in LINQ query * #2238 Call generic query.List from Linq queries * #2235 Configure log4net from embedded resource log4net.xml in tests * #2232 Use SqlStringBuilder for batching Future/QueryBatch queries * #2226 Use DateTime.UtcNow for timestamps * #2225 Avoid unnecessary locking via MethodImplOptions.Synchronized * #2223 Short-Circuit SessionFactoryImpl.Close() when already closed * #2214 Allow configuring auto-join transaction globally * #2213 Add a shortcut to reduce Transaction.Current reads * #2211 Port SupportsRowValueConstructorSyntaxInInList values * #2182 Upgrade AsyncGenerator to 0.17.1 * #2166 Optimize usages of SqlString.Append * #2163 Add virtual DefaultQueryProvider.CreateWithOptions * #2162 Use collection types for private members * #2161 Optimize ToArray conversions * #2159 Unify handling of composite values in hql and Criteria * #2153 Use generic parameters in ActionQueue * #2139 Add ability to set fetch for mapping in mapping by code * #2131 Create Stopwatch only if stats is enabled * #2126 Upgrade AsyncGenerator to 0.14.0 * #2125 Skip logger default initialization logic when logger provided by user * #2123 Use Assert.Throws instead of try-catch in tests * #2119 Obsolete interfaces for Loquacios configuration and use config classes directly * #2117 Replace array concatenation with hand written append * #2115 Statefull Session commit performance issue when nothing changed and second level cache with query cache enabled * #2091 Obsolete StringHelper.Join * #2084 Improve one-to-one handling in queries * #2082 Use entities prepared by Loader in hql select projections * #2078 Avoid unnecessary join for entity comparisons in with clause * #2071 Support subclass mapping with EntityName based base class mapping * #2061 Reduce cast usage for COUNT aggregate and add support for Mssql count_big * #2058 DB2 dialect enhancements * #2056 Optimize GetOrphans and remove wrong checks from IsNotTransientSlow * #2041 Hql entity join fixes * #2039 Use generic CollectingNodeVisitor in hql parser * #2036 Reduce cast usage for aggregate functions * #2032 Allow using ON instead of WITH in hql * #2024 Refactor to simplify netfx retargeting * #2022 Make CancellationToken optional for async Linq DML queries * #2010 Add new collection operation queue mechanism * #2009 Add support for IDictionary to IQuery.SetProperties * #2007 Dispose session in cascade tests * #2006 Skip Topological sorting if not required * #2003 Avoid some cases of Type -> string -> Type conversion in Mapping By Code * #2002 Refactor DependentAlias handling logic in JoinWalker * #1999 Optimize DistinctRootEntityResultTransformer * #1989 Optimize ProxyCacheEntry equality for the same instance * #1988 Improve exception on user types lacking some interfaces * #1984 Reduce SessionIdLoggingContext creation * #1981 Remove AbstractLazyInitializer unused field * #1979 Refactor sequential select * #1977 Obsolete IDeserializationCallback from EntityKey * #1972 Port Hibernate's EntityKey optimization * #1968 Optimize StaticProxyFactory GetProxy and GetFieldInterceptionProxy methods * #1955 Optimize batchable cache calls for cached queries * #1947 Partially port Hibernate's current field interceptor mechanism * #1946 Port Hibernate's BytecodeEnhancementMetadata * #1944 Extend IAccessOptimizer to support getting/setting single property value * #1943 Skip initialization of lazy properties when setting one * #1923 Obsolete StringHelper.Replace * #1860 LINQ "==" operator generates OR with IS NULL * #1754 Delay entity insert on Persist until session is flushed * #1627 Refactored session List method for Criteria * #913 NH-3704 - Allow Setting Dynamic Component Templates From Dictionary * #864 NH-2379 - Add support of Left Joins to Linq Provider * #803 NH-2521 - Session.EnableFilter method should work for HQL-DML statement * #780 NH-1200 - Exception occurs when using criteria exist queries * #767 NH-3892 - Add ability to coalesce using a property instead of a constant * #722 NH-1953 - Support Future for collection filters * #476 Eliminated double Persister resolution in Loader.InstanceNotYetLoaded flow ** Task * #2433 Improve slightly mapping documentation * #2432 Document the caches configuration providers * #2430 Document cache.serializer setting of CoreDistributedCache * #2397 Update GitReleaseManager * #2391 Use latest Firebird for AppVeyor and Travis * #2388 Release 5.3 * #2382 Refactor debug logging in AbstractBatcher * #2381 Use optimized Dictionary.Remove(key, out value) in .NET Core * #2379 Simplify swap items logic in LINQ Visitors * #2377 Use dotnet to push packages to nuget * #2376 Add MyGet gallery link to readme * #2368 Replace SafetyEnumerable with OfType where applicable * #2363 Upgrade AsyncGenerator to 0.18.2 * #2356 Obsolete IdentitySet class * #2354 Do not require Mono to build on not Windows * #2353 Update Microsoft.SourceLink.GitHub to 1.0.0 * #2351 Get rid of JoinedEnumerable and SingletonEnumerable * #2348 Use static ReferenceComparer for reference comparisons * #2308 Merge 5.2.7 * #2294 Add StackExchangeRedis cache provider documentation * #2293 Update RtMemoryCache framework dependency * #2265 Fix code style issues * #2251 Publish development nightly builds on nuget * #2205 Merge 5.2.6 * #2171 Upgrade NUnit * #2122 Update AsyncGenerator to 0.13.3 * #2016 Avoid recursive calls in BatchFetchQueue * #2014 Obsolete Environment.Properties * #1973 Investigate licenseUrl deprecation * #1971 Add SourceLink to allow NuGet package debugging * #1940 Allow to provide dev specific properties in NHibernate.dev.props * #1936 Upgrade AsyncGenerator to 0.13.1 ** Tests * #2384 Tests to verify NH-2329 is obsolete * #2360 Add OData test for single property $expand * #2089 Bidirectional list fails if session only knows about child * #2066 Tests for proxy interface handling * #1966 Test duplicated join on some Linq queries Build 5.2.7 ============================= Release notes - NHibernate - Version 5.2.7 4 issues were resolved in this release. ** Bug * #2302 Backport sqlite.binaryguid to configuration schema * #2298 Dml Linq Update Produce Wrong Sql * #2296 Missing Row Count in Debug Log for Future queries ** Task * #2303 Release 5.2.7 Build 5.2.6 ============================= Release notes - NHibernate - Version 5.2.6 11 issues were resolved in this release. ** Bug * #2190 Cannot instantiate a SessionFactory using Prevalence cache * #2177 New Fetch() method in QueryOver returns IQueryOver<> instead of QueryOver<> * #2172 Using DependentTransaction fails * #2175 Subcriteria on component collection generates incorrect join alias * #2173 Futures not batching correctly in NH 5.2.x * #2141 Undefined call to Equals object in collection during flush just before commit * #2127 StackExchangeRedisCache with PreferMultipleGet = true calls GetMany multiple times * #2110 Wrong GUID to string conversion with SQLite BinaryGuid=False ** Task * #2200 Release 5.2.6 * #2199 Upgrade AsyncGenerator to 0.8.2.12 ** Tests * #2132 Add GetMany for ReadWriteCache tests Build 5.2.5 ============================= Release notes - NHibernate - Version 5.2.5 5 issues were resolved in this release. ** Bug * #2075 Missing cast when comparing a guid and string columns in SAP SQL Anywhere * #2046 Fix nullable Guid ToString is not translated correctly on some dialects * #2043 System.Reflection.TargetException when an interface is used as class mapping proxy definition * #2040 Incorrect SQL when comparing a guid and string column in Sql Server ** Task * #2086 Release 5.2.5 Build 5.2.4 ============================= Release notes - NHibernate - Version 5.2.4 3 issues were resolved in this release. The dialect change has the side effect of re-enabling a hack used by NHibernate.Spatial, allowing Spatial users to upgrade to NHibernate 5.2.x. See NHibernate.Spatial#104. ##### Possible Breaking Changes ##### * Using DML on an entity collection was applying the changes without filtering according to the entity. It will now throw a NotSupportedException. ** Bug * #2020 Throw for DML on filter * #2011 Use a statically resolved dialect when building the session factory ** Task * #2030 Release 5.2.4 As part of releasing 5.2.4, a missing 5.2.0 possible breaking change has been added about property-ref on null values. See 5.2.0 possible breaking changes. Build 5.2.3 ============================= Release notes - NHibernate - Version 5.2.3 1 issue was resolved in this release. ** Bug * #1964 Unable to serialize session because SerializationFieldInfo is not marked as serializable Build 5.2.2 ============================= Release notes - NHibernate - Version 5.2.2 3 issues were resolved in this release. ** Bug * #1953 Query space invalidation doesn't work for bulk actions * #1269 NH-3069 - Cannot use Session.Lock with Version column on abstract base class ** Task * #1957 Release 5.2.2 Build 5.2.1 ============================= Release notes - NHibernate - Version 5.2.1 5 issues were resolved in this release. ** Bug * #1928 JoinAlias on JoinQueryOver fails * #1920 ISession.Get may fail with a null exception * #1918 Property-ref on many-to-one with composite id fails ** Task * #1932 Release 5.2.1 * #1927 Add missing possible breaking change As part of releasing 5.2.1, a missing 5.2.0 possible breaking change has been added about duplicated columns in mapping. See 5.2.0 possible breaking changes. Build 5.2.0 ============================= Release notes - NHibernate - Version 5.2.0 157 issues were resolved in this release. ##### Possible Breaking Changes ##### * Entities having many non-readonly properties (including many-to-one) mapped to the same column will no more silently ignore the trouble till an insert or update is attempted. They will now cause the session factory built to fail. When mapping many properties to the same column, all of them excepted at most one should be mapped with `insert="false" update="false"`. * Mappings mixing column elements and formula elements were taking into account only the formula elements. They will now take into account all elements. * Mappings mixing column elements and/or formula elements with a column attribute or a formula attribute were silently ignoring the attribute. They will now throw. * Mappings mixing a column attribute and a formula attribute were silently doing some best effort logic, either considering this as a two columns mapping, the second one being the formula (most cases), or only taking into account the formula (case of the `` mapping). They will now throw. * NHibernate StringType has gained case-sensitivity and culture parameters. Previously it was ignoring parameters. This type may change its behavior for any mapping having defined parameters for this type. See #1833. * Mapping a dynamic component with a Hashtable property instead of an IDictionary is no more supported. * Querying a dynamic entity as a Hashtable instead of an IDictionary is no more supported. * A collection mapped with a `property-ref` will no more support being accessed when the referenced property is null. It will throw. Previously, the collection was not throwing but was always loaded empty. * With PostgreSQL, a HQL query using the bitwise xor operator "^" or "bxor" was exponentiating the arguments instead. It will now correctly apply the xor operator. (# operator in PostgreSQL SQL.) * Auto-generated constraint names will not be the same than the ones generated with previous NHibernate versions under .Net Framework. (Under .Net Core those names were anyway changing at each run.) The new ones will be the same whatever the runtime used for generating them. * Some generated PK names may change, if a table name has a quoting symbol at precise 13th character. * The WcfOperationSessionContext has been removed from .Net Core and .Net Standard builds. See #1842. * Some classes, which were not serializing the session factory, do now serialize it. In case of cross-process serialization/deserialization, these session factories will need to be properly named, by setting the session_factory_name setting in the configuration used to build them. This may mainly affect users of a distributed second level cache, if their cache implementation uses binary serialization. Affected classes are: CacheKey, CollectionKey, EntityKey and EntityUniqueKey. * Some types cache representations have changed. Out-of-process second level caches should be cleared after upgrading NHibernate, if some of those types were cached. The concerned types are: CultureInfoType, TypeType, UriType, XDocType, XmlDocType. * Dialect.GetIdentitySelectString was called by the entity persisters with inverted parameter values: the table name in the column parameter, and the column name in the table parameter. No built-in dialects were using the parameter values. External dialects which were using it inverted (causing issues to collection persisters, which have always supplied them correctly) needs to be accordingly adjusted. * Users providing through an IObjectFactory some custom logic for instantiating value types will now need to supply their own result transformer if they were using AliasToBeanResultTransformer with value types, or their own entity tuplizer if they were using value types as entities. * Users providing through an IObjectFactory some custom logic for instantiating their custom session contexts will have to implement ICurrentSessionContextWithFactory and add a parameterless public constructor to their custom context, and move their custom instantiation logic from IObjectsFactory.CreateInstance(Type, object[]) to IObjectsFactory.CreateInstance(Type). * Various *Binding classes of NHibernate will now always have their protected dialect field null. (These classes are not expected to be derived by users, as there is no way to use custom descendants with NHibernate.) * AbstractPersistentCollection.AfterInitialize does no more perform queued operations. Queued operations are now run by a later call to a new method, ApplyPendingOperations. Concrete custom implementations relying on the queued operations to be done by their base AfterInitialize will need to be changed accordingly. ** Bug * #1900 Do not generate FK on non-generated unique constraint * #1888 Second level cache key mismatch * #1886 Superfluous SQL casts generated in FirebirdClientDriver * #1885 Process classes accordingly to inheritance path in mapping by code * #1884 Fix attempt of static proxies to call base method for abstract classes * #1874 Item in child collection not being removed * #1872 Fix property ref handling * #1870 Update build-menu options in documentation * #1867 Fix registration of current_date for some dialects * #1859 Fix filter & where fragment appended after lock hint * #1855 Fix NotNullUnique not taken into account for single column * #1849 Loquatious QueryCache constraint should be an IQueryCacheFactory constraint * #1836 Cannot create configuration due to log4net loading failure * #1824 property-ref on a component's property causes "wrong number of columns" error * #1821 Allow using ICompositeUserType for collection element mappings in Mapping By Code * #1818 Handle DbDataReaders that do not support GetSchemaTable * #1812 Fix the handling without meta-values * #1809 Update the mapping documentation * #1799 Default value of 'proxyfactory.factory_class' in the documentation * #1774 HQL and LINQ query by the type on with meta-type "string" fails * #1769 Table mapping for UniqueColumn uses unstable GetHashCode() method * #1764 Fix configuration schema forbidding custom bytecode provider * #1760 Support formula on one-to-many map-key * #1756 Fix unsaved-value for assigned identifiers * #1753 Fix possible InvalidCastException in ActionQueue * #1751 Avoid completing the same transaction twice * #1748 Fix a bad setting naming about transaction scopes * #1745 Remove obsoleted hibernate configuration prefix * #1744 Reconnect lazy property proxy on deserialization * #1737 Remove a binary breaking change introduced in #305 * #1728 Generate a correct proxy for interfaces * #1727 Fix a null-ref exception with no-proxy one-to-one * #1726 Fix serialization exception when run on .NET Core 2.1 * #1719 Cascade delete-orphan on no-proxy null association fails * #1706 Entity Projection: Fixed AsEntity() for root entity * #1704 GroupBy to custom class fails with ArgumentException * #1696 Fixed CriteriaImpl.Clone for readonly query * #1692 Update base_mapping.xml * #1673 Bitwise xor treated as pow with PostgreSQL * #1654 Fix the url to the quickstart of DocBook * #1635 IdentitySelectString implementation is inconsistent * #1612 Fix TypedValue not always using adequate comparer with SetParameterList * #1609 Schema validation using SQLite and a specific schema fails * #1366 NH-3506 - ICriteria/QueryOver create incorrect left join condition when table-per-hierarchy is used with filters * #1358 NH-3992 - Intermediate inherited classes are not mapped correctly * #1344 NH-3864 - Cacheable Multicriteria/Future'd query with aliased join throw exception * #1339 NH-3823 - Initialization of Set with Lazy=Extra causes pending additions to disappear * #1338 NH-3806 - Saving entities with proxy associations leads to fetching associated entities * #1300 NH-3403 - Wrong parameter size in query with MsSql2000Dialect,MsSql2005Dialect and MsSql2008Dialect * #1293 NH-3350 - Duplicate records using Future() * #1278 NH-3189 - IManyToOneMapper lacks method to add columns AND formula into a single relationship * #1214 NH-2180 - Many-To-Many with Property-ref fails to get subitems with FetchMode Join * #1201 NH-1316 - PostgreSQL dialect use of lastval to retrieve last inserted "id" not safe with Triggers * #1182 NH-3860 - Missing EntityName in IManyToOneMapper * #1170 NH-3646 - Incorrect query when items removed from a collection of components contain null values * #1163 NH-3545 - SchemaValidator fails for PostgreSql sequences * #1151 NH-3426 - Wrong result when converting Guid to string * #1121 NH-3095 - Cast from mapped long field to enum leads to 'Specified cast not valid' * #1096 NH-2836 - SchemaValidator throws with SqlCe4 if db-schema set * #1089 NH-2755 - LockMode hash differs in x86 and 64bit OS * #1037 NH-3749 - Unnecessary comma in CREATE TABLE statement * #1016 NH-3007 - Informix dialect generates incorrect boolean constants * #1000 NH-2558 - NoViableAltException with boolean expression in OrderBy clause * #990 NH-2016 - Duplicate Association Path when creating multiple aliases * #460 Fix Criteria caching filtered collections ** New Feature * #1892 Allow disabling Firebird driver parameter casting * #1879 LINQ Coalesce and Conditional on Properties * #1854 Add SQL Anywhere 17 support * #1848 Add in ByCode support of all type mappings on Id * #1833 Parametrize string type comparer * #1830 Add a Linux build menu * #1796 Support CacheMode in QueryBatch * #1786 Document future results * #1772 Support futures with stateless session * #1752 Async ISynchronization * #1742 Add new DB2CoreDriver to use with IBM.Data.DB2.Core provider * #1693 Implement SurrogateSelector * #1690 Bitwise xor not supported by SQLite * #1682 Add support for System.MathF methods * #1662 Add support for SAP HANA * #1633 Added support for batching 2nd level cache operations when loading entities and collections * #1631 Create UtcTicks and UtcDbTimestamp types * #1599 Full control of entities fetching in Criteria * #1381 NHibernate's IQuery is missing AddSynchronizedQuerySpace * #968 NH-2285 - Support for LockMode in linq provider * #920 NH-3991 - Support for Sybase ASE ADO.NET 4 Provider * #897 NH-2187 - ElementAt LINQ extension method is not supported. * #838 NH-3805 - Add support for string indexer property (get_Chars) * #819 NH-3088 - Support the item operator [] on lists in linq queries ** Improvement * #1908 Control over BeginTransaction in AdoTransaction * #1905 Improve support of Npgsql 4 * #1901 Add ability to use dynamic entities as C# dynamic * #1890 Merge two logs in one * #1875 Improve exception message in case of duplicated column * #1869 Replace an O(n) lookup in LINQ query parsing by an O(1) one * #1846 Remove dependency on System.Security.Permissions package for .NET Standard and .NET Core * #1842 Remove WcfOperationSessionContext from .Net Core and .Net Standard * #1838 Cannot add HqlJoin to HqlFrom * #1827 Include the query in loader PostInstantiate QueryException * #1819 Append the batched sql statement when StaleStateException occurs * #1814 Mark proxy assembly with IgnoresAccessChecksToAttribute to allow implementing non public interfaces * #1808 Support mixed formulas and columns * #1792 Obsolete HolderInstantiator * #1788 Implement multiple get and put for query cache and query batch * #1785 Update user types documentation * #1782 Refactor BugTestCase * #1781 Clean-up IObjectsFactory usages * #1778 Allow to use dynamic objects as dynamic components * #1777 Replace ICache interface by a CacheBase class * #1776 Make cache types serialization friendly * #1775 Start/Stop required db-service for TeamCity * #1770 Make obsolete abstract virtual * #1767 Allow generic dictionaries for dynamic entities * #1765 Provide cacheable representations for all NHibernate built-in types * #1762 Remove duplicated and obsolete interceptor documentation * #1761 Update mapping documentation * #1759 Support mixed formulas and columns in By Code * #1736 Remove excessive rowIdAlias parameter in Loader * #1713 Update contributing guidelines * #1712 Support IEquatable in LINQ provider * #1710 Rationalize DateTimeOffset read and write * #1709 Lazy properties static proxy * #1703 Remove dialect instantiation in AddDeserializedMapping * #1700 Single place to specify TargetFrameworks * #1699 Add ability to load types from in-memory-only assemblies * #1698 Document setting the logger factory programmatically * #1694 Implement CollectionHelper.GetHashCode that accepts IEqualityComparer * #1689 Purge more Invariant culture usages * #1671 Decouple configuration of IObjectsFactory from BytecodeProvider * #1666 Handle multi-queries support in FutureBatch * #1656 Allow any cache.* property in NHibernate configuration * #1641 Add cross platform build for full .NET Framework * #1452 Async After-/BeforeTransactionCompletion * #874 NH-3543 - Enhanced Db2 driver to support multi query * #865 NH-2428 - Session.MultiCriteria and FlushMode.Auto inside transaction * #840 NH-3835 - Future/MultiCriteria 2nd level caching * #822 NH-3150 - Select Post Insert Generator Improvements * #755 NH-3670 - Dynamic component should allow generic dictionary * #752 NH-3541 - Future queries of Criteria API/QueryOver are batched separately from other query methods * #696 Upgrade to ReLinq 2.2.0 * #415 Add check to ensure that IUserCollectionType.Instantiate returns uninitialized collection ** Task * #1863 Release 5.2.0 * #1823 Run tests for SQLite on .NET Core * #1783 Obsolete MultiQuery and MultiCriteria * #1773 Obsolete unused version related methods of SByteType * #1771 Obsolete unused "xml" type methods * #1743 Merge 5.1.3 into master * #1739 Upgrade to AsyncGenerator 0.8.2.7 * #1688 Merge 5.1.2 into master * #1687 Update NUnit to 3.10.1 * #881 NH-3358 - Document all attributes for the element tag ** Tests * #1887 Test ref and out methods with static proxy * #1724 NH-2716 - Modify test case for discarding the alleged bug * #1584 Test Parent property is not accessible in queries * #1531 Test for Merging a bidirectional list creates unnecessary UPDATE statement * #1440 Test case for ComposedId Entity with Lazy Property is not proxified * #1414 Test ISession.IsDirty() should not trigger cascade saving As part of releasing 5.2.0, a misnamed setting in 5.0.0 release notes has been fixed: transaction.use_connection_on_system_events correct name is transaction.use_connection_on_system_prepare Build 5.1.7 ============================= Release notes - NHibernate - Version 5.1.7 ** Bug * #2298 Dml Linq Update Produce Wrong Sql Build 5.1.6 ============================= Release notes - NHibernate - Version 5.1.6 ** Bug * #2172 Using DependentTransaction fails Build 5.1.5 ============================= Release notes - NHibernate - Version 5.1.5 ##### Possible Breaking Changes ##### * Using DML on an entity collection was applying the changes without filtering according to the entity. It will now throw a NotSupportedException. ** Bug * #2043 System.Reflection.TargetException when an interface is used as class mapping proxy definition * #2020 Throw for DML on filter ** Task * #2074 Release 5.1.5 Build 5.1.4 ============================= Release notes - NHibernate - Version 5.1.4 ** Bug * #1959 Backport Query space invalidation doesn't work for bulk actions Build 5.1.3 ============================= Release notes - NHibernate - Version 5.1.3 ** Bug * #1741 Fix DbType.Binary registration in DB2Dialect * #1732 Dictionary failure in Loader * #1730 Query cache always missed in session having altered the entities * #1711 Fix static proxy serialization ** Task * #1716 Release 5.1.3 Build 5.1.2 ============================= Release notes - NHibernate - Version 5.1.2 ** Bug * #1680 RowCount not working with JoinEntityAlias * #1672 Generated async methods do not correctly propagate OperationCanceledException * #1667 Collection initializing with zero rows after update to NH5 * #1660 Wrong CopyTo implementation * #1650 Cannot use cache.use_sliding_expiration in hibernate.cfg.xml * #1585 Hashset unsupported by SetParameterList * #1355 NH-3928 - Random invalid SQL generated when using bitwise operators ** Task * #1668 Merge 5.0.5 into 5.1.x * #1664 Release 5.1.2 * #1659 Merge 5.0.4 into 5.1.x As part of releasing 5.1.2, a missing 5.0.0 possible breaking change has been added about future queries with data providers not actually supporting them. See 5.0.0 possible breaking changes. Build 5.1.1 ============================= Release notes - NHibernate - Version 5.1.1 ** Bug * #1645 One-to-one with property-ref triggers StackOverflow Exception * #1643 TypeLoadException in StaticProxyFactory after upgrading to 5.1.0 * #1640 Handle all overloads of String.Trim*() * #1636 Fix api documentation assets path * #1628 StackOverflowException for lazy proxied entities with explicit interface properties * #1618 Fix NuGet push script * #1149 NH-3391 - StatelessSession: one-to-one detail-object is always null ** Improvement * #1646 Add a link to release notes in NuGet package * #1639 Speedup access to SQL Server on Linux * #1624 Add missing ids on documentation sections * #1619 Document "entity join" and "entity projection" ** Task * #1649 Release 5.1.1 * #1622 Update cache documentation * #1621 Upgrade Async Generator to a version compatible with VS 15.6.3 Build 5.1.0 ============================= Release notes - NHibernate - Version 5.1.0 ** Highlights * NHibernate has gained two new target frameworks: .Net Core 2.0 and .Net Standard 2.0. NHibernate NuGet package provides them, along with the .Net framework 4.6.1 build. For these new frameworks, some additional specificities or limitations apply: * Binary serialization is not supported - the user shall implement serialization surrogates for System.Type, FieldInfo, PropertyInfo, MethodInfo, ConstructorInfo, Delegate, etc. * SqlClient, Odbc, Oledb drivers are converted to ReflectionBasedDriver to avoid the extra dependencies. * CallSessionContext uses a static AsyncLocal field to mimic the CallContext behavior. * System transactions (transaction scopes) are untested, due to the lack of data providers supporting them. * 114 issues were resolved in this release. ##### Possible Breaking Changes ##### * Since Ingres9Dialect is now supporting sequences, the enhanced-sequence identifier generator will default to using a sequence instead of a table. Revert to previous behavior by using its force_table_use parameter. * Some overridable methods of the Dialect base class and of MsSql2000Dialect have been obsoleted in favor of new methods. Dialects implementors need to override the replacing methods if they were overriding the obsolete ones, which are: * Dialect.GetIfNotExistsCreateConstraint(Table table, string name), replaced by GetIfNotExistsCreateConstraint(string catalog, string schema, string table, string name). * Dialect.GetIfNotExistsCreateConstraintEnd(Table table, string name), replaced by GetIfNotExistsCreateConstraintEnd(string catalog, string schema, string table, string name). * Dialect.GetIfExistsDropConstraint(Table table, string name), replaced by GetIfExistsDropConstraint(string catalog, string schema, string table, string name). * Dialect.GetIfExistsDropConstraintEnd(Table table, string name), replaced by GetIfExistsDropConstraintEnd(string catalog, string schema, string table, string name). * MsSql2000Dialect.GetSelectExistingObject(string name, Table table), replaced by GetSelectExistingObject(string catalog, string schema, string table, string name). ** Bug * #1606 NHibernate 5 precision maximum on decimal reduced vs. NHibernate 4 * #1605 MySql batcher may attempt initiating a new batch without closing open reader first. * #1604 MySql batcher disables db exception translation * #1602 Preserve original snapshot mode. * #1594 AsyncLocal leak in SystemTransactionContext * #1587 Prevent substitute garbage collection * #1565 For update with outer join fails with PostgreSQL * #1562 Fix round registration * #1559 Deep removal of Fetch result operators when Any is used * #1556 Linq query with "Contains" on persistent collection fails * #1551 Assert for a null reference in a flaky test. * #1536 Avoid a null reference exception in ExpressionKeyVisitor * #1535 Fix some HQL functions registration * #1534 Fixed entity name retrieval for EntityProjection * #1526 ExpressionKeyVisitor does not produce unique keys for anonymous types coming from different assemblies * #1514 Fix exceptions serialization * #1511 Test Unicode string. * #1509 Add missing NHibernateLogLevel.Info in example web project * #1507 NH-3119 - fix test not supporting optimization * #1506 SQLite is bugged with distributed transactions: disable distributed tests * #1505 Chaining scopes with ODBC is bugged: disabling the test. * #1501 Fix NH-3023 test * #1496 Fix ManyToOneType.IsModified to handle both object instance and identifier passed to the parameter “old”. * #1491 Forgotten async generation for #1487 * #1486 Fix IsModified so that a null equates empty components when using select-before-update. * #1484 Fix default types * #1478 Exception when using envers with the latest logging changes * #1476 Fix GetQueryCache storing two different caches. * #1468 Comparison with DateTime? produces wrong SQL * #1463 Fix a null reference case in session context * #1454 Fix ProxyFactory cache * #1445 Upgrade AsyncGenerator to 0.6.2 and regenerate. * #1442 Unable to use an entity with a `FieldInterceptor` property and a lazy loaded property * #1436 StackOverflowException when merging an entity with a lazy property * #1434 Replace remaining SetOptions with WithOptions * #1385 SecondLevelCache CreateSQLQuery().UniqueResult() throws Exception Specified cast is not valid. * #1372 NH-3982 - Simple query with Cacheable, Fetch and SingleOrDefault throws exception (regression from 3.3.0) * #1371 NH-3898 - Configuring a property with generated="insert" turns "Property.IsUpdatable" into"false" even using update="true" in the xml mapping file. * #1363 NH-2500 - NH 3.0 Linq provider uses query parameters from first call in subsequent calls. * #1335 NH-3787 - Decimal truncation in Linq ternary expression * #1330 NH-3673 - Closure variable values locked in from expressions in NHibernate LINQ provider * #1226 NH-2534 - Join-fetching a many-to-one with property-ref results in select n+1 problem * #1196 NH-4087 - Decimal truncation occurs after 5 digits * #1119 NH-3084 - Class NHibernate.Loader.Loader logs SQL statement on INFO level * #1052 NH-3976 - Inconsistent Decimal/NHibernateUtil.Currency handling causing runtime error when using Oracle.ManagedDataAccess * #987 NH-1509 - MsSql2000Dialect does not use default schema when creating "if exists" statement * #448 NH-1285 - Drop/Create script with default_schema/default_catalog fix(SqlServer) ** New Feature * #1588 Add a generic batcher for insert/update/delete statements, usable with PostgreSQL and others * #1545 Support to join not associated entities in Criteria (aka Entity Join) * #1451 New StaticProxyFactoryFactory * #1403 Add timeouts support to MultiCriteria * #1377 Logging refactoring * #954 NH-3807 - Support for .NET Core 2.0 * #948 NH-3435 - Ability to select entities in Criteria projections * #910 NH-3606 - Open a stateless session from a session * #908 NH-3470 - Allow Linq Query to load entities as read-only ** Improvement * #1600 Set MySqlClientBatchingBatcher as a default batcher for MySqlDataDriver * #1597 Add support for single-argument truncate to dialects that do not support it natively * #1569 Modernize test example * #1567 Avoid Trim().Length as empty check and ToLowerInvariant() in string comparison * #1561 NAnt refactoring * #1558 Improved collection batch fetching * #1557 Aggregate named queries validation exceptions. * #1555 Catch practices: avoid losing catched exception information. * #1552 Obsolete UnmodifiableDictionary * #1549 Remove an override which was doing the same thing as the base * #1548 Add a missing short circuit in query parameter expansion. * #1547 Double query translation * #1546 Remove a redundant argument in Linq provider ExecuteQuery. * #1543 Various string manipulation optimizations * #1541 Cache subclass entity aliases in Loader * #1537 Avoid unnecessary persister lookup in Loader * #1529 Lazy mapping schema loading * #1521 Enable warning as error for all projects and configurations * #1519 Reuse SchemaExport in CreateSchema/DropSchema in tests * #1515 Make NHibernateUtil.Initialize / IsInitialized better reusable for sub-projects like Envers * #1504 More reliable SQLite handling in tests. * #1502 Upgrade Iesi to 4.0.3 in order to use a release assembly * #1498 Cease throwing bare Exception * #1494 Update to Oracle installation instructions. * #1490 Optimize empty arrays usages * #1483 Clean-up of TypeFactory * #1482 Refactored DefaultEntityAliases to avoid unnecessary calculations * #1477 Reuse the same generic EmptyMapClass instance across the project * #1475 Document expiration constraint on UpdateTimestampsCache region. * #1467 Reduce the number of calls to UpdateTimestampsCache * #1466 Obsolete EqualsHelper * #1465 Obsolete EnumerableExtensions * #1464 Obsolete ISessionImplementor.Initialize method * #1449 Document IsDirty potential side effects * #1441 Normalize TargetInvocationException unwrapping * #1417 Table counter for aliases should be stable * #1412 Store Linq query options in a query provider instead of a queryable * #1391 Performance regression in SessionIdLoggingContext * #843 NH-3879 - SequenceHiLoGenerator Jumps 1 number each lo > maxLo * #842 NH-3869 - Add a way of adding comments into LINQ queries * #837 NH-3804 - Register CHR/CHAR, NCHAR, UNICODE, and ASCII standard functions to the dialect(s) * #831 NH-3515 - Support for Decimal.Round, Decimal.Ceiling, Decimal.Floor and other static methods of Decimal class * #768 NH-3921 - Support sequences in Ingres9Dialect * #769 NH-3922 - The various timeout methods should indicate time unit ** Task * #1610 Move MsSql constants from driver to dialect. * #1608 Missing Async test for GH1594 * #1603 Forgotten async generation of truncate test * #1598 Upgrade IESI to 4.0.4 for having a bumped file version. * #1589 Add framework info to example web project and enable .NET Core. * #1574 Fix encoding in NorthwindDbCreator.cs * #1563 Generate Async test for deep removal of fetch. * #1527 Adjust ignore rules for not ignoring DebugHelpers folder and contents * #1525 5.1.0 release * #1524 Reduce breaking changes due to Ingres9 sequence support * #1518 Upgrade to AsyncGenerator 0.8.1 * #1512 Upgrade to NUnit 3.9 * #1474 Upgrade AsyncGenerator to 0.7.0 ** Tests * #1539 Add more tests for constants in LINQ queries As part of releasing 5.1.0, a missing 5.0.0 possible breaking change has been added about inequality semantic in LINQ queries. See 5.0.0 possible breaking changes. Build 5.0.8 ============================= Release notes - NHibernate - Version 5.0.8 ** Bug * #2172 Using DependentTransaction fails Build 5.0.7 ============================= Release notes - NHibernate - Version 5.0.7 ##### Possible Breaking Changes ##### * Using DML on an entity collection was applying the changes without filtering according to the entity. It will now throw a NotSupportedException. ** Bug * #2043 System.Reflection.TargetException when an interface is used as class mapping proxy definition * #2020 Throw for DML on filter ** Task * #2073 Release 5.0.7 Build 5.0.6 ============================= Release notes - NHibernate - Version 5.0.6 ** Bug * #1672 Generated async methods do not correctly propagate OperationCanceledException * #1355 NH-3928 - Random invalid SQL generated when using bitwise operators ** Task * #1686 Release 5.0.6 Build 5.0.5 ============================= Release notes - NHibernate - Version 5.0.5 ** Bug * #1665 Have IFutureEnumerable.GetEnumerable executing immediatly the query Build 5.0.4 ============================= Release notes - NHibernate - Version 5.0.4 ** Bug * #1658 Add missing cache setting Build 5.0.3 ============================= Release notes - NHibernate - Version 5.0.3 ** Bug * #1462 Fix disposing SessionIdLoggingContext if CheckAndUpdateSessionStatus is failed Build 5.0.2 ============================= Release notes - NHibernate - Version 5.0.2 ** Bug * #1456 NH-4052 - Add missing serializable implementation * #1455 Reduces check session and set context id redundant calls * #1453 Eliminate unnecessary AsyncLocal allocation if SessionId isn't changed ** Task * #1457 Release 5.0.2 As part of releasing 5.0.2, a missing 5.0.0 possible breaking change has been added about Dialects requiring now to be configured. See 5.0.0 possible breaking changes. Build 5.0.1 ============================= Release notes - NHibernate - Version 5.0.1 ** Bug * #1428 Insert underscore in combined parameter name * #1424 Bad wording and example fixes in cache documentation. * #1420 Fix #1419 - ISession.IsDirty() shouldn't throw exception for transient many-to-one object in a session * #1419 ISession.IsDirty() shouldn't throw exception for transient many-to-one object in a session * #1418 Column.GetAlias should account for other suffixes * #1415 Correct MaxAliasLength for various dialects * #1393 Fix Linq Future aggregates failures, fixes #1387 * #1389 Add support for out/ref Nullable parameters of proxied methods * #1387 Linq Sum() with ToFutureValue fails * #1384 Fix a column spec causing missing col in pdf, fix a text overflow * #1380 #750 - AliasToBean failure, test case and fix * #1378 Fix #1362 - Running Unit tests against SQLite fails on datetime/UTC * #1362 NH-4093 - Running Unit tests against SQLite fails on numerous (22) datetime/UTC related tests. * #1357 NH-3983 - ToFuture throws ArgumentException at CreateCombinedQueryParameters * #1179 NH-3840 - Wrong documentation of "cascade" in 5.1.11 (many-to-one) * #1165 NH-3554 - Docs - bidirectional, indexed collections * #983 Fix forgotten CDATA closure. * #879 NH-4006 - Provide a correct MaxAliasLength for various dialects * #750 Transformers.AliasToBean: Value cannot be null. Parameter name: key * #712 NH-4092 - AsyncGenerator creates unused private static event handler in SQLite20Driver ** Improvement * #1410 Remove unused code in build scripts * #1404 Use MsBuild for packing .nupkg files * #1401 Clean up db tests dependencies * #1395 Documentation fixes * #1386 Lack of custom logging documentation * #1382 Jira to GitHub: change issue naming in tests * #1379 Documentation fixes * #982 Back port doc fixes * #824 NH-3208 - Document all possible settings in hibernate.cfg * #823 NH-3179 - Documentation should note that OnDelete should set IsSaved to false in chapter 24.1 * #788 NH-1947 - Undocumented attributes on sql-query element * #713 Switch to GitHub issues * #711 Switch doc generation to UTF-8. ** Task * #1431 Release 5.0.1 * #1405 Remove unused and broken NHibernate.Setup WiX project Build 5.0.0 ============================= ** Highlights * IO bound methods have gained an async counterpart. Not intended for parallelism, make sure to await each call before further interacting with a session and its queries. * Strongly typed DML operation (insert/update/delete) are now available as Linq extensions on queryables. * Entities collections can be queried with .AsQueryable() Linq extension without being fully loaded. * Reference documentation has been curated and completed, notably with a Linq section. http://nhibernate.info/doc/nhibernate-reference/index.html ** Known BREAKING CHANGES from NH4.1.1.GA to 5.0.0 NHibernate now targets .Net 4.6.1. Remotion.Linq and Antlr3 libraries are no more merged in the NHibernate library, and must be deployed along NHibernate library. (NuGet will reference them.) Classes and members which were flagged as obsolete in the NHibernate 4.x series have been dropped. Prior to upgrading, fix any obsolete warning according to its message. See NH-4075 and NH-3684 for a list. ##### Possible Breaking Changes ##### * All members exposing some System.Data types have been changed for the corresponding System.Data.Common types. (IDbCommand => DbCommand, ...) * The Date NHibernate type will no more replace by null values below its base value (which was year 1753). Its base value is now DateTime.MinValue. Its configuration parameter is obsolete. * NHibernate type DateTimeType, which is the default for a .Net DateTime, does no longer cut fractional seconds. Use DateTimeNoMsType if you wish to have fractional seconds cut. It applies to its Local/Utc counterparts too. * LocalDateTimeType and UtcDateTimeType do no more accept being set with a value having a non-matching kind, they throw instead. * DbTimestamp will now round the retrieved value according to Dialect.TimestampResolutionInTicks. * When an object typed property is mapped to a NHibernate timestamp, setting an invalid object in the property will now throw at flush instead of replacing it with DateTime.Now. * Decimal type registration now correctly handles maximal precision. For most dialects, it is 28, matching the .Net limit. Values in mappings above maximal precision will be reduced to maximal precision. * Default cast types do no more resolve string to 255 length and decimal to its default precision/scale for the dialect. They resolve to 4000 length string and (28, 10) precision/scale decimals by default, and are trimmed down according to dialect. Those defaults can be overridden with query.default_cast_length, query.default_cast_precision and query.default_cast_scale settings. * Future queries with data provider not actually supporting them (not supporting mutliple queries in a single SQL command) are no more immediately executed at the .Future call. They are executed only when directly enumerated or when their IFutureEnumerable.GetEnumerable method is called. (This aligns them with the behavior of FutureValue.) * Dialects are now configurable. If you instantiate a dialect directly, make sure you call its Configure method, with as argument the properties of a NHibernate Configuration object. You may use instead Dialect.GetDialect methods, which configure the dialect before returning it. * Transaction scopes handling has undergone a major rework. See NH-4011 for full details. ** More transaction promotion to distributed may occur if you use the "flush on commit" feature with transaction scopes. Explicitly flush your session instead. Ensure it does not occur by disabling transaction.use_connection_on_system_prepare setting. ** After transaction events no more allow using the connection when they are raised from a scope completion. ** Connection enlistment in an ambient transaction is now enforced by NHibernate by default. ** The connection releasing is no more directly triggered by a scope completion, but by later interactions with the session. * AdoNetWithDistributedTransactionFactory has been renamed AdoNetWithSystemTransactionFactory. * Subcriteria.UniqueResult for value types now return default(T) when result is null, as was already doing CriteriaImpl.UniqueResult. * AliasToBeanResultTransformer property/field resolution logic has changed for supporting members which names differ only by case. See NH-3693 last comments for details. * Linq inequality implementation has been changed for supporting null, meaning that a "a != b" expression will now be considered matching if one side is null, while previously due to SQL null semantic it was considered non-matching. See NH-3100. * Linq extension methods marked with attribute LinqExtensionMethod will no more be evaluated in-memory prior to query execution when they do not depend on query results, but will always be translated to their corresponding SQL call. This can be changed with a parameter of the attribute. * Linq Query methods are now native members of ISession and IStatelessSession instead of being extension methods. * Linq provider now use Remotion.Linq v2, which may break Linq provider extensions, mainly due to names changes. See https://github.com/nhibernate/nhibernate-core/pull/568 changes to test files for examples. * NHibernate Linq internals have undergone some minor changes which may break custom Linq providers due to method signature changes and additional methods to implement. * IMapping interface has an additional Dialect member. ISessionFactoryImplementor has lost it, since it gains it back through IMapping. * IDriver.ExpandQueryParameters and DriverBase.CloneParameter take an additional argument. * NullableType, its descendent (notably all PrimitiveType) and IUserType value getters and setters now take the session as an argument. This should mainly impact custom types implementors. * EmitUtil is now internal and has been cleaned of unused members. * ContraintOrderedTableKeyColumnClosure has been renamed ConstraintOrderedTableKeyColumnClosure. * enabledFilter parameter has been removed from IProjection.ToSqlString and ICriterion.ToSqlString methods. * Proxy factory and proxy cache now use TypeInfo instead of System.Type. This should be transparent for most users. * Exceptions which were based on ApplicationException are now based on Exception: HibernateException, ParserException and AssertionFailure. The logger factory which could throw a bare ApplicationException now throws an InstantiationException instead. * ThreadSafeDictionary class has been removed. Use System.Collections.Concurrent.ConcurrentDictionary instead. * Entity mode switching capability, which had never been fully implemented, is dropped. * BytecodeProviderImpl, intended for .Net Framework 1 and broken, is dropped. * Sessions concrete classes constructors have been changed. (It is not expected for them to be used directly.) * Obsolete setting interceptors.beforetransactioncompletion_ignore_exceptions is dropped. * SQL Server 2008+ dialects now use datetime2 instead of datetime for all date-time types, including timestamp. This can be reverted with sql_types.keep_datetime setting. * SQL Server 2008+ timestamp resolution is now 100ns in accordance with datetime2 capabilities, down from 10ms previously. This can be reverted with sql_types.keep_datetime setting. * Oracle 9g+ dialects now use timestamp(7) for all date time types, instead of timestamp(4). * Oracle 9g+ timestamp resolution is now 100ns in accordance with timestamp(7) capabilities, down from 100µs previously. * Oracle: Hbm2dll will no-more choose N- prefixed types for typing Unicode string columns by default. This can be changed with oracle.use_n_prefixed_types_for_unicode setting, which will furthermore control DbCommand parameters typing accordingly. See NH-4062. * SqlServerCe: the id generator "native" will now resolve as table-hilo instead of identity. * Firebird: timestamp resolution is now 1ms. * PostgreSQL: if Npgsql v3 or later is used, time DbParameters will be fetched as TimeSpan instead of DateTime. * DB2 & Oracle lite: decimal type registration was hardcoding precision as 19 and was using length as scale. It now uses precision and scale from mapping when specified, and disregards length. * Ingres & Sybase ASA: decimal type registration was hardcoding precision as 18 and was using length as scale. It now uses precision and scale from mapping when specified, and disregards length. * ODBC: String parameter length will no more be specified by the OdbcDriver. Release notes - NHibernate - Version 5.0.0 ** Sub-task * [NH-3956] - Native SQL query plan may get wrong plan * [NH-3957] - Second level query cache may yields wrong cache entry * [NH-4001] - Remove ThreadSafeDictionary ** Bug * [NH-926] - Identity insert fails with SQL Ce dialect and aggressive connection release mode. * [NH-1752] - NHibernate Date type converts to NULL * [NH-1904] - Protected properties and public properties cannot have the same name with different case * [NH-2029] - filter-def's use-many-to-one=false should take ON into consideration * [NH-2145] - AssertionFailure exception at ISession.Save * [NH-2176] - Consecutive TransactionScopes cannot be used in same NHibernate session * [NH-2238] - "DTC transaction prepare phase failed" when UPDATE:ing in a promoted TransactionScope * [NH-2241] - Batch Insert using stateless session when using second level cache throws exception when unable to determine transient status * [NH-2928] - Connections can only be closed after the Transaction is completed * [NH-3023] - Deadlocks may cause connection pool corruption when in a distributed transaction * [NH-3078] - TimeAsTimeSpanType issue when using Sybase Advantage Database * [NH-3100] - Problem in use if condition for nullable boolean in linq to NHibernate * [NH-3114] - Collection inside Component cannot be mapped to a different table * [NH-3227] - InvalidOperationException in AbstractBatcher when distributed transaction is aborted * [NH-3247] - Char value gets 'cached' in Where-queries * [NH-3374] - Session.Merge throws InvalidCastException when using a Lazy bytes[] property * [NH-3600] - ISession.Save returns wrong Id * [NH-3665] - FirstOrDefault() broken since 3.3.4 and 3.4.0 * [NH-3693] - AliasToBeanResultTransformerFixture fails under Firebird * [NH-3755] - Proxy exception for multiple joined-subclass * [NH-3757] - Dynamic entity mapped with entity-name cannot have a component of a fixed class * [NH-3793] - Attribute entity-name on is ignored, causing mapping exception * [NH-3845] - OfType fails with polymorphism * [NH-3850] - .Count(), .Any() and other aggregates return only first result on polymorphic queries * [NH-3885] - ThreadSafeDictionary is not threadsafe * [NH-3889] - Coalesce on entity in sub-select causes incorrect SQL * [NH-3895] - Problem with DateTime fractional seconds on ODBC for MS SQL Server * [NH-3911] - Reflection Optimizer tries to cast values to getter type in setter * [NH-3913] - Component has bag of child components. Child property mapping ignored * [NH-3931] - Invalid order of child inserts when using TPH inheritance * [NH-3946] - Linq where "is base class" doesn't get subclasses * [NH-3948] - CheckAndUpdateSessionStatus() called twice in CreateFilter method inside SessionImpl class * [NH-3950] - FutureValue fails on Linq queries defining a PostExecuteTransformer * [NH-3954] - Dynamic proxy cache may yield a wrong proxy * [NH-3955] - Unreliable Equals implementation * [NH-3961] - Invalid date parameter format with nullables and MappedAs * [NH-3966] - Missing command set dispose in batchers * [NH-3968] - Distributed transaction cannot be committed because AdoNetWithDistributedTransactionFactory tries to write data by using locked sqlConnection * [NH-3969] - Firebird: TimestampResolutionInTicks should be 1ms * [NH-3977] - Thread safety weaknesses of MapBasedSessionContext * [NH-3981] - CollectionHelper.DictionaryEquals throws * [NH-3985] - ObjectDisposedException is thrown when using a child session after having previously disposed of another child session. * [NH-3998] - SqlServer CE: "The column aliases must be unique" exception is thrown in some tests * [NH-4013] - SqlClientBatchingBatcher CloseCommands contract violated * [NH-4022] - MsSql2012Dialect: Invalid drop sequence statement * [NH-4024] - ODBC failures with time * [NH-4027] - Missing disposals of enumerators * [NH-4035] - Teardown failure should not prevent cleanup * [NH-4038] - Mapping a TimeSpan in a collection component mapping maps as a BIGINT * [NH-4046] - Default length too short for variable length types with SAP Anywhere / ASE * [NH-4077] - Possible race condition in ActionQueue.ExecuteActions * [NH-4083] - ODBC nvarchar parameter corruption * [NH-4084] - DbTimestamp cause stale update exception * [NH-4086] - TimeType may lose fractional seconds * [NH-4088] - Dialect.GetCastTypeName is buggy * [NH-4090] - Prepare SQL fails with time parameters and SQL Server 2008+ * [NH-4091] - SQL Server CE allocates too much memory with blob and sql prepare ** New Feature * [NH-1530] - Add support for XmlDocType and XDocType for Oracle * [NH-2319] - IQueryable support for persistent collections * [NH-3488] - Strongly Typed Updates and Deletes * [NH-3771] - Implement setting to enable Batch Update with Optimistic Locking control * [NH-3905] - Support async: Blocking IO leads to ThreadPool starvation and limits scalability * [NH-3934] - Add methods WhereNot(ICriterion) and AndNot(ICriterion) in QueryOver * [NH-3951] - Support .All() result operator * [NH-3996] - Postgres: add support for XmlDocType and XDocType * [NH-4009] - Allow marking a Linq extension as db only * [NH-4017] - Handle Time parameter conversion for newer Npgsql * [NH-4018] - Port AutoJoinTransaction feature * [NH-4028] - Support inconclusive tests in result comparison * [NH-4031] - Add an AsyncLocalSessionContext * [NH-4032] - Supports multiple factories with ThreadStaticSessionContext * [NH-4062] - Properly handle Oracle Unicode support dual model ** Task * [NH-3683] - Fix Compilation Warnings * [NH-3958] - Reference documentation: missing types * [NH-3959] - Fix documentation typos * [NH-3999] - Document effect of quoted identifier on case sensitivity * [NH-4000] - Release 5.0 * [NH-4004] - Restrict tests running on SQL CE * [NH-4051] - Replace System.Linq.Dynamic with System.Linq.Dynamic.Core in tests * [NH-4057] - Fix tests for MySql * [NH-4058] - Fix Oracle managed failing tests * [NH-4063] - Fix ODBC failing tests ** Improvement * [NH-1851] - Mapping a TimeSpan as TimeAsTimeSpan for MySQL * [NH-2444] - Document linq provider * [NH-3094] - Linq does not support unary plus and unary minus operators * [NH-3370] - Remove warning about "NHibernate.Type.CustomType -- the custom type * is not serializable" * [NH-3386] - Linq OrderBy NewID() * [NH-3431] - Replace System.Data with System.Data.Common * [NH-3578] - Subcriteria.UniqueResult for value types should return default(T), same as CriteriaImpl.UniqueResult when result is null * [NH-3669] - Query should be instance method of ISession * [NH-3723] - Some tests are failing when log level set to DEBUG * [NH-3744] - Fixed spelling of ContraintOrderedTableKeyColumnClosure method * [NH-3750] - Use NuGet to refer to Remotion.Linq (unmerge ReMotion.Linq) * [NH-3877] - Target .NET 4.6.1 * [NH-3900] - Upgrade to Nunit 3.x * [NH-3919] - Clean up and harmonize datetime types with regards to different dialects * [NH-3927] - Switch to SemVer version scheme * [NH-3932] - Merge() may fire unnecessary updates if collection and version mapping exists * [NH-3943] - Use NuGet to reference packages instead of local copies * [NH-3944] - Upgrade to ReLinq 2 * [NH-3945] - Update to Antlr 3.5.1 * [NH-3952] - Cleanup EnumerableHelper usage * [NH-3962] - Build with MSBuild Tools 2017 (15) * [NH-3963] - More explicit error on MappedAs invalid usage. * [NH-3964] - Refactor reflection patterns * [NH-3970] - TestCase base class: avoid hiding test failure on tear-down * [NH-3973] - Remove enabledFilter parameter from IProjection.ToSqlString and ICriterion.ToSqlString methods * [NH-3975] - Synchronize some features dialect support properties * [NH-3978] - Extract IDatabaseMetadata from DatabaseMetadata * [NH-3987] - Re-implement NhQueryable options * [NH-3988] - Replace ApplicationException base class with just Exception * [NH-3990] - Upgrade to VS2017 Project structure * [NH-3993] - Component Element Customizer Missing ability to map non-public parents and composite element relations * [NH-3997] - SqlServer CE: Make native generator to be TableHiLoGenerator * [NH-4003] - Refactor session constructor * [NH-4010] - Visual Studio launcher still launches 2015 * [NH-4014] - Update SQLite assembly for tests * [NH-4015] - Update Npgsql driver and enable DTC for it in tests * [NH-4019] - Pass assembly into log4net functions * [NH-4020] - Use TypeBuilder.CreateTypeInfo() * [NH-4021] - Track all opened session in tests * [NH-4023] - Pass ISessionImplementor to all value setters and getters of nullable types * [NH-4026] - Update Firebird driver and use server in tests * [NH-4030] - Cleanup and xml doc of Linq Future extension * [NH-4033] - Update MySql connector used in tests * [NH-4034] - Flush all sessions participating in a transaction * [NH-4043] - Complete keyword registration needs done in dialects. * [NH-4049] - EmitUtil can be cleaned up * [NH-4050] - Use Task.Run instead of BeginInvoke in tests * [NH-4052] - Collect schema validation exceptions * [NH-4064] - Unmerge Antrl3.Runtime * [NH-4073] - Replace NHibernate.Web.Example with modern version * [NH-4076] - Do not resurrect session ** Remove Feature * [NH-3684] - Remove