Skip to content

Instantly share code, notes, and snippets.

View sebersole's full-sized avatar

Steve Ebersole sebersole

View GitHub Profile

Designations of Hibernate contracts

This document aims to classify the Hibernate contracts (classes, interfaces, methods, etc) into a number of designations meant to indicate the level of "stability" of the contract. Stability here means the expectation applications should have with regard to that contract’s binary signature compatibility moving forward. To that end, we designate a contract within a number of categories as described below.

The designations

package org.hibernate.jpa;
public interface AvailableSettings {
...
/**
* @deprecated use {@link #JPA_METAMODEL_POPULATION} instead.
*/
@Deprecated
public interface WrappedNClob extends WrappedClob {
/**
* {@inheritDoc}
*
* @deprecated Use {@link #getWrappedNClob()} instead
*/
@Override
@Deprecated
public NClob getWrappedClob();
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
configurations {
wildflyModules
}
dependencies {
wildflyModules 'org.hibernate:hibernate-orm-modules:5.3.0-SNAPSHOT:wildfly-11-dist@zip'
compile 'org.hibernate:hibernate-core:5.3.0-SNAPSHOT'
}
CREATE OR REPLACE TRIGGER your_view_trigger
INSTEAD OF UPDATE ON your_view
BEGIN
if ( :old.first_column != :new.first_column ) {
UPDATE first_column_table
SET first_column = :new.first_column
WHERE id = :old.id
}
...
END;
class ProvisionOverride {
private final String match;
private String replacementGroupId;
private String replacementArtifactId;
private String replacementVersion;
public String getVersion() {
return replacementVersion;
}
plugins {
id "org.wildfly.build.provision" version "0.0.1"
}
repositories {
mavenCentral()
maven {
name 'jboss-nexus'
url "http://repository.jboss.org/nexus/content/groups/public/"
}

Hibernate ORM 5.3.0.Beta1

This is a first Beta release in the Hibernate ORM 5.3 family. 5.3 represents a JPA 2.2 compatible version on top of 5.2 which includes the changes discussed below.

See Jira for the complete list of changes

JPA 2.2 features

@sebersole
sebersole / ConnectionReleaseModeSettingTest.java
Created January 10, 2018 15:38
Test illustrating setting connection-release-mode does in fact work
package org.hibernate.test.connections;
import java.util.Map;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.testing.jta.TestingJtaBootstrap;
import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
import org.junit.Test;
apply plugin: 'java'
repositories {
mavenCentral()
// mavenLocal()
maven {
name 'jboss-nexus'
url "http://repository.jboss.org/nexus/content/groups/public/"
}