File tree Expand file tree Collapse file tree 3 files changed +64
-49
lines changed
java/org/hibernate/orm/test/array
resources/org/hibernate/orm/test/array Expand file tree Collapse file tree 3 files changed +64
-49
lines changed Original file line number Diff line number Diff line change 44 */
55package org .hibernate .orm .test .array ;
66
7- import org .hibernate .testing .orm .junit .DialectFeatureChecks ;
87import org .hibernate .testing .orm .junit .DomainModel ;
9- import org .hibernate .testing .orm .junit .RequiresDialectFeature ;
108import org .hibernate .testing .orm .junit .SessionFactory ;
119import org .hibernate .testing .orm .junit .SessionFactoryScope ;
1210import org .junit .jupiter .api .Test ;
1715/**
1816 * @author Emmanuel Bernard
1917 */
20- @ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsNoColumnInsert .class )
21- @ DomainModel (
22- xmlMappings = "org/hibernate/orm/test/array/A.hbm.xml"
23- )
18+ @ SuppressWarnings ("JUnitMalformedDeclaration" )
19+ @ DomainModel (xmlMappings = "org/hibernate/orm/test/array/A.xml" )
2420@ SessionFactory
2521public class ArrayTest {
2622
@@ -37,7 +33,7 @@ public void testArrayJoinFetch(SessionFactoryScope scope) {
3733
3834 scope .inTransaction (
3935 session -> {
40- A retrieved = session .get ( A .class , a .getId () );
36+ A retrieved = session .find ( A .class , a .getId () );
4137 assertNotNull ( retrieved );
4238 assertNotNull ( retrieved .getBs () );
4339 assertEquals ( 1 , retrieved .getBs ().length );
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <!--
3+ ~ SPDX-License-Identifier: Apache-2.0
4+ ~ Copyright Red Hat Inc. and Hibernate Authors
5+ -->
6+ <entity-mappings xmlns =" http://www.hibernate.org/xsd/orm/mapping"
7+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
8+ version =" 7.0" >
9+ <package >org.hibernate.orm.test.array</package >
10+
11+ <entity class =" A" >
12+ <table name =" aaa" />
13+ <attributes >
14+ <id name =" id" >
15+ <generated-value generator =" increment" />
16+ </id >
17+ <one-to-many name =" bs" target-entity =" B" fetch-mode =" JOIN" >
18+ <join-column name =" a_fk" />
19+ <order-column name =" idx" />
20+ <cascade >
21+ <cascade-all />
22+ </cascade >
23+ </one-to-many >
24+ </attributes >
25+ </entity >
26+
27+ <entity class =" B" >
28+ <table name =" bbb" />
29+ <attributes >
30+ <id name =" id" >
31+ <generated-value generator =" increment" />
32+ </id >
33+ </attributes >
34+ </entity >
35+ </entity-mappings >
36+
37+ <!-- <hibernate-mapping -->
38+ <!-- package="org.hibernate.orm.test.array">-->
39+ <!-- -->
40+ <!-- <class name="A" lazy="true" table="aaa">-->
41+ <!-- -->
42+ <!-- <id name="id">-->
43+ <!-- <generator class="native"/>-->
44+ <!-- </id>-->
45+
46+ <!-- <array name="bs" cascade="all" fetch="join">-->
47+ <!-- <key column="a_id"/>-->
48+ <!-- <list-index column="idx"/>-->
49+ <!-- <one-to-many class="B"/>-->
50+ <!-- </array>-->
51+
52+ <!-- </class>-->
53+
54+ <!-- <class name="B" lazy="true" table="bbb">-->
55+ <!-- <id name="id">-->
56+ <!-- <generator class="native"/>-->
57+ <!-- </id>-->
58+ <!-- </class>-->
59+
60+
61+ <!-- </hibernate-mapping>-->
You can’t perform that action at this time.
0 commit comments