code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
@Test public void testNullnessPredicateUse1(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); // there is one Coin (id=3) which has a null currency_fk scope.inTransaction( (session) -> { final String hql = "sel...
Baseline test for {@link #testNullnessPredicateUse2}. Here we use the normal "target" reference, which for a not-found mapping should trigger a join to the association table and use the fk-target column
testNullnessPredicateUse1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@Test public void testNullnessPredicateUse2(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); // there is one Coin (id=3) which has a null currency_fk scope.inTransaction( (session) -> { final String hql = "sel...
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
testNullnessPredicateUse2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@Test public void testFkRefDereferenceInvalid(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { try { final String hql = "select c from Coin c where fk(c.currency).somethin...
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
testFkRefDereferenceInvalid
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@Test public void testFkRefDereference(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from Coin c where fk(c.exchange).name is not null"; ses...
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
testFkRefDereference
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@BeforeEach public void prepareTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> { Currency euro = new Currency( 1, "Euro" ); Coin fiveC = new Coin( 1, "Five cents", euro ); session.persist( euro ); session.persist( fiveC ); Currency usd = new Currency( 2, "USD" ); Coin penny...
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
prepareTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@AfterEach public void cleanupTest(SessionFactoryScope scope) throws Exception { scope.inTransaction( (session) -> { session.createMutationQuery( "delete Coin" ).executeUpdate(); session.createMutationQuery( "delete Currency" ).executeUpdate(); } ); }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
cleanupTest
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@Id public Integer getId() { return id; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public String getName() { return name; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@OneToOne(fetch = FetchType.LAZY) @NotFound(action = NotFoundAction.IGNORE) @JoinColumn( name = "currency_fk" ) public Currency getCurrency() { return currency; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
getCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public void setCurrency(Currency currency) { this.currency = currency; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
setCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@ManyToOne(fetch = FetchType.LAZY) @NotFound(action = NotFoundAction.IGNORE) @JoinColumn(name = "exchange_country", referencedColumnName = "country_iso") @JoinColumn(name = "exchange_name", referencedColumnName = "name") public Exchange getExchange() { return exchange; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
getExchange
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public void setExchange(Exchange exchange) { this.exchange = exchange; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
setExchange
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@Id public Integer getId() { return id; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public String getName() { return name; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
It is not ideal that we render the join for these. Ideally we'd perform a subsequent-select, not sure if that is feasible as it requires understanding the overall query structure. Compare with {@link #testNullnessPredicateUse1}. There, because we perform a scalar select, the currency does not need to be fetched. So...
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/FkRefTests.java
Apache-2.0
@Test public void testLogicalOneToOne(SessionFactoryScope scope) { Currency euro = new Currency(); euro.setName( "Euro" ); Coin fiveC = new Coin(); fiveC.setName( "Five cents" ); fiveC.setCurrency( euro ); scope.inTransaction( session -> { session.persist( euro ); session.persist( fiveC ); ...
@author Emmanuel Bernard @author Gail Badner
testLogicalOneToOne
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
@Id @GeneratedValue public Integer getId() { return id; }
@author Emmanuel Bernard @author Gail Badner
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
@author Emmanuel Bernard @author Gail Badner
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public String getName() { return name; }
@author Emmanuel Bernard @author Gail Badner
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
@author Emmanuel Bernard @author Gail Badner
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
@OneToOne(fetch = FetchType.LAZY) @NotFound(action = NotFoundAction.IGNORE) public Currency getCurrency() { return currency; }
@author Emmanuel Bernard @author Gail Badner
getCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public void setCurrency(Currency currency) { this.currency = currency; }
@author Emmanuel Bernard @author Gail Badner
setCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
@Id @GeneratedValue public Integer getId() { return id; }
@author Emmanuel Bernard @author Gail Badner
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
@author Emmanuel Bernard @author Gail Badner
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public String getName() { return name; }
@author Emmanuel Bernard @author Gail Badner
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
@author Emmanuel Bernard @author Gail Badner
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/NotFoundLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCurrency(SessionFactoryScope scope) { // test handling of a proxy for the missing Currency scope.inTransaction( (session) -> { final Currency proxy = session.byId( Currency.class ).getReference( 1 ); try { Hibernate.initialize( proxy ); Assertions.f...
Tests for `@OneToOne @NotFound(EXCEPTION)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>When loading the `Coin#currency`, `EXCEPTION` should trigger an exception since the particular `Coin#currency` fk is broken</li> </ol> @author ...
testProxyCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCoin(SessionFactoryScope scope) { // test handling of a proxy for the Coin with the missing Currency scope.inTransaction( (session) -> { final Coin proxy = session.byId( Coin.class ).getReference( 1 ); try { Hibernate.initialize( proxy ); Assertions...
Tests for `@OneToOne @NotFound(EXCEPTION)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>When loading the `Coin#currency`, `EXCEPTION` should trigger an exception since the particular `Coin#currency` fk is broken</li> </ol> @author ...
testProxyCoin
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testGet(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { session.get( Coin.class, 2 ); assertThat( statementInspector.getSqlQuer...
Tests for `@OneToOne @NotFound(EXCEPTION)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>When loading the `Coin#currency`, `EXCEPTION` should trigger an exception since the particular `Coin#currency` fk is broken</li> </ol> @author ...
testGet
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query - specifically forcing the join
testQueryImplicitPathDereferencePredicateBaseline
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline2(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c.id ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query - specifically forcing the join
testQueryImplicitPathDereferencePredicateBaseline2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline3(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c fro...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicateBaseline3
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicate(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from Coin c ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicate
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryOwnerSelection(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final String hql = "select c from Coin c where c.id = 1"; try { //noinspection unused (debugging) final Coin coin = session.createQuery( hql, Coin.class ).uniqueResult(); ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryOwnerSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryAssociationSelection(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c.currency from Coin c whe...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryAssociationSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@BeforeEach public void prepareTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> { Currency euro = new Currency( 1, "Euro" ); Coin fiveC = new Coin( 1, "Five cents", euro ); session.persist( euro ); session.persist( fiveC ); Currency usd = new Currency( 2, "USD" ); Coin penny...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
prepareTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@AfterEach public void cleanupTest(SessionFactoryScope scope) throws Exception { scope.inTransaction( (session) -> { session.createMutationQuery( "delete Coin" ).executeUpdate(); session.createMutationQuery( "delete Currency" ).executeUpdate(); } ); }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
cleanupTest
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Id public Integer getId() { return id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public String getName() { return name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@OneToOne(fetch = FetchType.EAGER) @NotFound(action = NotFoundAction.EXCEPTION) public Currency getCurrency() { return currency; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public void setCurrency(Currency currency) { this.currency = currency; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Id public Integer getId() { return id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public String getName() { return name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionLogicalOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCurrency(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final Currency proxy = session.byId( Currency.class ).getReference( 1 ); try { Hibernate.initialize( proxy ); Assertions.fail( "Expecting ObjectNotFoundException" ); } cat...
Tests for `@ManyToOne @NotFound(EXCEPTION)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`EXCEPTION` should trigger an exception since the particular `Coin#currency` fk is broken</li> </ol> @author Steve Ebersole
testProxyCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCoin(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final Coin proxy = session.byId( Coin.class ).getReference( 1 ); try { Hibernate.initialize( proxy ); Assertions.fail( "Expecting ObjectNotFoundException" ); } catch (FetchNot...
Tests for `@ManyToOne @NotFound(EXCEPTION)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`EXCEPTION` should trigger an exception since the particular `Coin#currency` fk is broken</li> </ol> @author Steve Ebersole
testProxyCoin
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testGet(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { try { // should fail here loading the Coin due to missing currency (see...
Tests for `@ManyToOne @NotFound(EXCEPTION)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`EXCEPTION` should trigger an exception since the particular `Coin#currency` fk is broken</li> </ol> @author Steve Ebersole
testGet
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query - specifically forcing the join. Because the
testQueryImplicitPathDereferencePredicateBaseline
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline2(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c.id ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query - specifically forcing the join
testQueryImplicitPathDereferencePredicateBaseline2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline3(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c fro...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicateBaseline3
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicate(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); // the problem, as with the rest of the failures here, is that the fetch // ca...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicate
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryOwnerSelection(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from Coin c where c.id = 1"; ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryOwnerSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryAssociationSelection(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); // NOTE: this one is not obvious // - we are selecting the association so from that persp...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryAssociationSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@BeforeEach public void prepareTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> { Currency euro = new Currency( 1, "Euro" ); Coin fiveC = new Coin( 1, "Five cents", euro ); session.persist( euro ); session.persist( fiveC ); Currency usd = new Currency( 2, "USD" ); Coin penny...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
prepareTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@AfterEach public void cleanupTest(SessionFactoryScope scope) throws Exception { scope.inTransaction( (session) -> { session.createMutationQuery( "delete Coin" ).executeUpdate(); session.createMutationQuery( "delete Currency" ).executeUpdate(); } ); }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
cleanupTest
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Id public Integer getId() { return id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public String getName() { return name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@ManyToOne(fetch = FetchType.EAGER) @NotFound(action = NotFoundAction.EXCEPTION) public Currency getCurrency() { return currency; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public void setCurrency(Currency currency) { this.currency = currency; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Id public Integer getId() { return id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public String getName() { return name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/exception/NotFoundExceptionManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCoin(SessionFactoryScope scope) { scope.inTransaction( (session) -> { // Coin#1 has the broken fk final Coin proxy = session.byId( Coin.class ).getReference( 1 ); assertThat( proxy ).isNotNull(); Hibernate.initialize( proxy ); assertThat( Hibernate.i...
Tests for `@ManyToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testProxyCoin
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCurrency(SessionFactoryScope scope) { scope.inTransaction( (session) -> { // Currency#1 does not exist final Currency proxy = session.byId( Currency.class ).getReference( 1 ); try { Hibernate.initialize( proxy ); Assertions.fail( "Expecting ObjectN...
Tests for `@ManyToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testProxyCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testGet(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { session.get( Coin.class, 2 ); assertThat( statementInspector.getSqlQuer...
Tests for `@ManyToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testGet
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from...
Tests for `@ManyToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testQueryImplicitPathDereferencePredicateBaseline
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline2(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c.id ...
Tests for `@ManyToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testQueryImplicitPathDereferencePredicateBaseline2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline3(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c fro...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicateBaseline3
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicate(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from Coin c ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicate
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryOwnerSelection(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final String hql = "select c from Coin c where c.id = 1"; final Coin coin = session.createQuery( hql, Coin.class ).uniqueResult(); assertThat( coin ).isNotNull(); assertThat...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryOwnerSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryAssociationSelection(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c.currency from Coin c whe...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryAssociationSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@BeforeEach protected void prepareTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> { Currency euro = new Currency( 1, "Euro" ); Coin fiveC = new Coin( 1, "Five cents", euro ); session.persist( euro ); session.persist( fiveC ); Currency usd = new Currency( 2, "USD" ); Coin pe...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
prepareTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@AfterEach protected void dropTestData(SessionFactoryScope scope) throws Exception { scope.inTransaction( (session) -> { session.createMutationQuery( "delete Coin" ).executeUpdate(); session.createMutationQuery( "delete Currency" ).executeUpdate(); } ); }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
dropTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Id public Integer getId() { return id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public String getName() { return name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@ManyToOne(fetch = FetchType.EAGER) @NotFound(action = NotFoundAction.IGNORE) public Currency getCurrency() { return currency; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public void setCurrency(Currency currency) { this.currency = currency; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Id public Integer getId() { return id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public String getName() { return name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
public void setName(String name) { this.name = name; }
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreManyToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCoin(SessionFactoryScope scope) { scope.inTransaction( (session) -> { // Coin#1 has the broken fk final Coin proxy = session.byId( Coin.class ).getReference( 1 ); assertThat( proxy ).isNotNull(); Hibernate.initialize( proxy ); assertThat( Hibernate.i...
Tests for `@OneToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testProxyCoin
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testProxyCurrency(SessionFactoryScope scope) { scope.inTransaction( (session) -> { // Currency#1 does not exist final Currency proxy = session.byId( Currency.class ).getReference( 1 ); try { Hibernate.initialize( proxy ); Assertions.fail( "Expecting ObjectN...
Tests for `@OneToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testProxyCurrency
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testGet(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final Coin coin = session.get( Coin.class, 1 ); assertThat( coin.getCurr...
Tests for `@OneToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testGet
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from...
Tests for `@OneToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testQueryImplicitPathDereferencePredicateBaseline
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline2(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c.id ...
Tests for `@OneToOne @NotFound(IGNORE)` NOTES:<ol> <li>`@NotFound` should force the association to be eager - `Coin#currency` should be loaded immediately</li> <li>`IGNORE` says to treat the broken fk as null</li> </ol> @author Steve Ebersole
testQueryImplicitPathDereferencePredicateBaseline2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicateBaseline3(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c fro...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicateBaseline3
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryImplicitPathDereferencePredicate(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from Coin c ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryImplicitPathDereferencePredicate
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0
@Test @JiraKey( "HHH-15060" ) public void testQueryOwnerSelection(SessionFactoryScope scope) { final SQLStatementInspector statementInspector = scope.getCollectingStatementInspector(); statementInspector.clear(); scope.inTransaction( (session) -> { final String hql = "select c from Coin c where c.id = 1"; ...
Baseline for {@link #testQueryImplicitPathDereferencePredicate}. Ultimately, we want SQL generated there to behave exactly the same as this query
testQueryOwnerSelection
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/notfound/ignore/NotFoundIgnoreOneToOneTest.java
Apache-2.0