File tree Expand file tree Collapse file tree 13 files changed +216
-5
lines changed
NHibernate/Hql/Ast/ANTLR/Tree Expand file tree Collapse file tree 13 files changed +216
-5
lines changed Original file line number Diff line number Diff line change 1
- Build 5.5.0
1
+ Build 5.5.1
2
+ =============================
3
+
4
+ Release notes - NHibernate - Version 5.5.1
5
+
6
+ 3 issues were resolved in this release.
7
+
8
+ ** Bug
9
+
10
+ * #3465 Invalid SQL created for some joins in a subquery
11
+
12
+ ** Task
13
+
14
+ * #3509 Release 5.5.1
15
+ * #3508 Merge 5.4.8 into 5.5.x
16
+
17
+
18
+ Build 5.5.0
2
19
=============================
3
20
4
21
Release notes - NHibernate - Version 5.5.0
@@ -88,6 +105,22 @@ Release notes - NHibernate - Version 5.5.0
88
105
* #3412 Revive hql ParsingFixture
89
106
90
107
108
+ Build 5.4.8
109
+ =============================
110
+
111
+ Release notes - NHibernate - Version 5.4.8
112
+
113
+ 2 issues were resolved in this release.
114
+
115
+ ** Bug
116
+
117
+ * #3489 Inserting multiple associations of the same entity fails
118
+
119
+ ** Task
120
+
121
+ * #3507 Release 5.4.8
122
+
123
+
91
124
Build 5.4.7
92
125
=============================
93
126
Original file line number Diff line number Diff line change @@ -43,5 +43,21 @@ public async Task SimpleDeleteAsync()
43
43
await ( tx . CommitAsync ( ) ) ;
44
44
}
45
45
}
46
+
47
+ [ Test ]
48
+ public async Task InsertFromSelectWithMultipleAssociationsAsync ( )
49
+ {
50
+ Assume . That ( TestDialect . NativeGeneratorSupportsBulkInsertion ,
51
+ "The dialect does not support a native generator compatible with bulk insertion." ) ;
52
+
53
+ using var s = OpenSession ( ) ;
54
+ using var tx = s . BeginTransaction ( ) ;
55
+
56
+ await ( s . CreateQuery ( "insert into Enrolment (Course, Student)" +
57
+ " select e.Course, e.Student from Enrolment e" )
58
+ . ExecuteUpdateAsync ( ) ) ;
59
+
60
+ await ( tx . CommitAsync ( ) ) ;
61
+ }
46
62
}
47
- }
63
+ }
Original file line number Diff line number Diff line change
1
+ //------------------------------------------------------------------------------
2
+ // <auto-generated>
3
+ // This code was generated by AsyncGenerator.
4
+ //
5
+ // Changes to this file may cause incorrect behavior and will be lost if
6
+ // the code is regenerated.
7
+ // </auto-generated>
8
+ //------------------------------------------------------------------------------
9
+
10
+
11
+ using System . Linq ;
12
+ using NUnit . Framework ;
13
+
14
+ namespace NHibernate . Test . NHSpecificTest . GH3465
15
+ {
16
+ using System . Threading . Tasks ;
17
+ [ TestFixture ]
18
+ public class FixtureAsync : BugTestCase
19
+ {
20
+ [ Test ]
21
+ public void ThetaJoinSubQueryAsync ( )
22
+ {
23
+ using ( var session = OpenSession ( ) )
24
+ using ( session . BeginTransaction ( ) )
25
+ {
26
+ var query = session . CreateQuery ( "select e.Id from EntityA e where exists (from e.Children b, EntityC c)" ) ;
27
+ Assert . DoesNotThrowAsync ( ( ) => query . ListAsync ( ) ) ;
28
+ }
29
+ }
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ namespace NHibernate . Test . BulkManipulation
2
+ {
3
+ public class Course
4
+ {
5
+ public virtual long CourseId { get ; set ; }
6
+ public virtual string Description { get ; set ; }
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ namespace NHibernate . Test . BulkManipulation
4
+ {
5
+ [ Serializable ]
6
+ public class Enrolment
7
+ {
8
+ public virtual long EnrolmentId { get ; set ; }
9
+ public virtual Student Student { get ; set ; }
10
+ public virtual Course Course { get ; set ; }
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <hibernate-mapping
3
+ xmlns=" urn:nhibernate-mapping-2.2"
4
+ assembly=" NHibernate.Test"
5
+ namespace=" NHibernate.Test.BulkManipulation" >
6
+
7
+ <class name =" Course" >
8
+ <id name =" CourseId" >
9
+ <generator class =" native" />
10
+ </id >
11
+ <property name =" Description" />
12
+ </class >
13
+
14
+ <class name =" Student" >
15
+ <id name =" StudentId" >
16
+ <generator class =" native" />
17
+ </id >
18
+ <property name =" Name" />
19
+ </class >
20
+
21
+ <class name =" Enrolment" >
22
+ <id name =" EnrolmentId" >
23
+ <generator class =" native" />
24
+ </id >
25
+ <many-to-one name =" Student" column =" StudentId" class =" Student" />
26
+ <many-to-one name =" Course" column =" CourseId" class =" Course" />
27
+ </class >
28
+
29
+ </hibernate-mapping >
Original file line number Diff line number Diff line change @@ -32,5 +32,21 @@ public void SimpleDelete()
32
32
tx . Commit ( ) ;
33
33
}
34
34
}
35
+
36
+ [ Test ]
37
+ public void InsertFromSelectWithMultipleAssociations ( )
38
+ {
39
+ Assume . That ( TestDialect . NativeGeneratorSupportsBulkInsertion ,
40
+ "The dialect does not support a native generator compatible with bulk insertion." ) ;
41
+
42
+ using var s = OpenSession ( ) ;
43
+ using var tx = s . BeginTransaction ( ) ;
44
+
45
+ s . CreateQuery ( "insert into Enrolment (Course, Student)" +
46
+ " select e.Course, e.Student from Enrolment e" )
47
+ . ExecuteUpdate ( ) ;
48
+
49
+ tx . Commit ( ) ;
50
+ }
35
51
}
36
- }
52
+ }
Original file line number Diff line number Diff line change
1
+ namespace NHibernate . Test . BulkManipulation
2
+ {
3
+ public class Student
4
+ {
5
+ public virtual long StudentId { get ; set ; }
6
+ public virtual string Name { get ; set ; }
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+
4
+ namespace NHibernate . Test . NHSpecificTest . GH3465
5
+ {
6
+ class EntityA
7
+ {
8
+ public virtual Guid Id { get ; set ; }
9
+ public virtual ISet < EntityB > Children { get ; set ; }
10
+ }
11
+ class EntityB
12
+ {
13
+ public virtual Guid Id { get ; set ; }
14
+ public virtual EntityA Parent { get ; set ; }
15
+ }
16
+ class EntityC
17
+ {
18
+ public virtual Guid Id { get ; set ; }
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ using System . Linq ;
2
+ using NUnit . Framework ;
3
+
4
+ namespace NHibernate . Test . NHSpecificTest . GH3465
5
+ {
6
+ [ TestFixture ]
7
+ public class Fixture : BugTestCase
8
+ {
9
+ [ Test ]
10
+ public void ThetaJoinSubQuery ( )
11
+ {
12
+ using ( var session = OpenSession ( ) )
13
+ using ( session . BeginTransaction ( ) )
14
+ {
15
+ var query = session . CreateQuery ( "select e.Id from EntityA e where exists (from e.Children b, EntityC c)" ) ;
16
+ Assert . DoesNotThrow ( ( ) => query . List ( ) ) ;
17
+ }
18
+ }
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments