-
Notifications
You must be signed in to change notification settings - Fork 3.6k
HHH-19324 - Switch tests using hbm.xml to use mapping.xml #9956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/DynamicModelHelper.java
Fixed
Show fixed
Hide fixed
hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/DynamicModelHelper.java
Fixed
Show fixed
Hide fixed
hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/DynamicModelHelper.java
Fixed
Show fixed
Hide fixed
@Test | ||
public void testFullQueryReference(SessionFactoryScope scope) { | ||
scope.inTransaction( | ||
session -> session.createQuery( "from DynamicCompositeIdBasic e where e.id.key1 = 1" ).list() |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
@Test | ||
public void testEmbeddedQueryReference(SessionFactoryScope scope) { | ||
scope.inTransaction( | ||
session -> session.createQuery( "from DynamicCompositeIdBasic e where e.key1 = 1" ).list() |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
public void testFullQueryReference(SessionFactoryScope scope) { | ||
scope.inTransaction( | ||
(session) -> { | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
scope.inTransaction( | ||
(session) -> { | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e" ).list(); | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e where e.id.key1 = 1" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
(session) -> { | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e" ).list(); | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e where e.id.key1 = 1" ).list(); | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e where e.id.key2.name = 'abc'" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
public void testEmbeddedQueryReference(SessionFactoryScope scope) { | ||
scope.inTransaction( | ||
(session) -> { | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
scope.inTransaction( | ||
(session) -> { | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e" ).list(); | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e where e.key1 = 1" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
(session) -> { | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e" ).list(); | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e where e.key1 = 1" ).list(); | ||
session.createQuery( "select e from DynamicCompositeIdManyToOne e where e.key2.name = 'abc'" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
@Test | ||
public void testUsage(SessionFactoryScope factoryScope) { | ||
factoryScope.inTransaction( (session) -> { | ||
session.createQuery( "from SimpleDynamicEntity" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
public void testUsage(SessionFactoryScope factoryScope) { | ||
factoryScope.inTransaction( (session) -> { | ||
session.createQuery( "from SimpleDynamicEntity" ).list(); | ||
session.createQuery( "select e from SimpleDynamicEntity e" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
factoryScope.inTransaction( (session) -> { | ||
session.createQuery( "from SimpleDynamicEntity" ).list(); | ||
session.createQuery( "select e from SimpleDynamicEntity e" ).list(); | ||
session.createQuery( "select e from SimpleDynamicEntity e where e.name = 'abc'" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
@Test | ||
void testUsage(SessionFactoryScope factoryScope) { | ||
factoryScope.inTransaction( (session) -> { | ||
session.createQuery( "from SimpleEntity" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
void testUsage(SessionFactoryScope factoryScope) { | ||
factoryScope.inTransaction( (session) -> { | ||
session.createQuery( "from SimpleEntity" ).list(); | ||
session.createQuery( "select e from SimpleEntity e" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
factoryScope.inTransaction( (session) -> { | ||
session.createQuery( "from SimpleEntity" ).list(); | ||
session.createQuery( "select e from SimpleEntity e" ).list(); | ||
session.createQuery( "select e from SimpleEntity e where e.name = 'abc'" ).list(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
factoryScope.inTransaction( (session) -> { | ||
session.setCacheMode( CacheMode.IGNORE ); | ||
int i = 0; | ||
try (ScrollableResults sr = session.createQuery( "from DataPoint dp order by dp.x asc" ) |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
if ( ++i % nBeforeFlush == 0 ) { | ||
s.flush(); | ||
s.clear(); | ||
try (ScrollableResults sr = session.createQuery( "from DataPoint dp order by dp.x asc" ) |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
QueryProducerImplementor.createQuery
5ecc0f3
to
a657c4c
Compare
Some initial work on converting hbm.xml mappings in tests to mapping.xml. Additionally addresses the following, which were discovered during this process.
|
HHH-19310 - Simplified declaration of type for basic mappings in XML HHH-19422 - Introduce @CollectionIdJavaClass
HHH-19324 - Switch tests using hbm.xml to use mapping.xml
HHH-19310 - Simplified declaration of type for basic mappings in XML
This is preliminary work which is converting tests using hbm.xml mappings to instead use mapping.xml and addressing gaps. Ultimately this PR will get merged into main (7.x).
Once all tests have been converted and gaps addressed (which just might mean Jira created for thre moment), we can start actually removing the code for applying hbm.xml - though that will be 8.x specific
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19324