-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6933bf0
commit 7cd90cc
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace NHibernate.Test.NHSpecificTest.GH3465 | ||
{ | ||
class EntityA | ||
{ | ||
public virtual Guid Id { get; set; } | ||
public virtual ISet<EntityB> Children { get; set; } | ||
} | ||
class EntityB | ||
{ | ||
public virtual Guid Id { get; set; } | ||
public virtual EntityA Parent { get; set; } | ||
} | ||
class EntityC | ||
{ | ||
public virtual Guid Id { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Linq; | ||
using NUnit.Framework; | ||
|
||
namespace NHibernate.Test.NHSpecificTest.GH3465 | ||
{ | ||
[TestFixture] | ||
public class Fixture : BugTestCase | ||
{ | ||
[Test] | ||
public void ThetaJoinSubQuery() | ||
{ | ||
using (var session = OpenSession()) | ||
using (session.BeginTransaction()) | ||
{ | ||
var query = session.CreateQuery("select e.Id from EntityA e where exists (from e.Children b, EntityC c)"); | ||
Assert.DoesNotThrow(() => query.List()); | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/NHibernate.Test/NHSpecificTest/GH3465/Mappings.hbm.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" | ||
namespace="NHibernate.Test.NHSpecificTest.GH3465"> | ||
<class name="EntityA"> | ||
<id name="Id" generator="guid.comb" /> | ||
<set name="Children" cascade="all-delete-orphan" inverse="true"> | ||
<key column="EntityAId" /> | ||
<one-to-many class="EntityB" /> | ||
</set> | ||
</class> | ||
<class name="EntityB"> | ||
<id name="Id" generator="guid.comb" /> | ||
<many-to-one name="Parent" column="EntityAId" class="EntityA" not-null="true" /> | ||
</class> | ||
<class name="EntityC"> | ||
<id name="Id" generator="guid.comb" /> | ||
</class> | ||
</hibernate-mapping> |