Skip to content

Instantly share code, notes, and snippets.

View sebersole's full-sized avatar

Steve Ebersole sebersole

View GitHub Profile

Hibernate ORM documentation

…​

<note>
<para>
This feature exists because of a highly questionable interpretation of the JPA specification
made by the SpecJ committee. Hibernate does not feel that JPA defines support for this, but
added the feature simply to be used in SpecJ benchmarks. Use of this feature may or may not
be portable from a JPA perspective.
</para>
</note>
1) my cr2 post
2) emmanuel's multi-tenancy & current session post
3) brett's test case templates post
...
commit 037d9720e49f04390d46efc8338d44ed7685409a
Author: Steve Ebersole <[email protected]>
Date: Thu Jul 30 09:26:45 2015 -0500
ORM CR3 blog
commit 77e5d9fda903085461657c1a88114819a48d4f23
Author: Steve Ebersole <[email protected]>
Date: Wed Jul 8 13:38:02 2015 -0500
@Override
public void doCreation(Metadata metadata, boolean createNamespaces, Dialect dialect, Target... targets)
throws SchemaManagementException {
boolean tryToCreateCatalogs = false;
boolean tryToCreateSchemas = false;
if ( createNamespaces ) {
if ( dialect.canCreateCatalog() ) {
tryToCreateCatalogs = true;
}
import org.asciidoctor.gradle.AsciidoctorTask
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
buildscript {
repositories {
Important

This guide and the tutorials are very much out-of-date as of 5.0. For details see HHH-9919. In the meantime, we suggest looking at the Pax Exam and Karaf based hibernate-osgi tests for examples of using Hibernate in Karaf specifically. Usage in other OSGi containers should be similar.

The Hibernate-produced Karaf features file (feature repository) is published to maven, along with our other artifacts,

catch (final Exception e) {
throw new IllegalClassFormatException( "Error performing enhancement" ) {
@Override
public synchronized Throwable getCause() {
return e;
}
};
}
java.lang.ClassNotFoundException: org.hibernate.jpa.test.instrument.Simple not found
at org.hibernate.jpa.test.instrument.InstrumentedClassLoader.loadClassBytes(InstrumentedClassLoader.java:94)
at org.hibernate.jpa.test.instrument.InstrumentedClassLoader.loadClass(InstrumentedClassLoader.java:39)
at org.hibernate.jpa.test.instrument.InterceptFieldClassFileTransformerTest.testEnhancement(InterceptFieldClassFileTransformerTest.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
-> StatementContext (statement) [`selecta.bfromSomethingainnerjoina.cc<EOF>`]
-> SelectStatementContext (selectStatement) [`selecta.bfromSomethingainnerjoina.cc`]
-> QueryExpressionContext (queryExpression) [`selecta.bfromSomethingainnerjoina.cc`]
-> QuerySpecContext (querySpec) [`selecta.bfromSomethingainnerjoina.cc`]
-> SelectClauseContext (selectClause) [`selecta.b`]
-> RootSelectExpressionContext (rootSelectExpression) [`a.b`]
-> ExplicitSelectListContext (explicitSelectList) [`a.b`]
-> ExplicitSelectItemContext (explicitSelectItem) [`a.b`]
-> DotIdentExpressionContext (expression) [`a.b`]
-> DotIdentifierPathContext (dotIdentifierPath) [`a.b`]