NativeQuery and parameters
by Steve Ebersole
In the interest of questioning everything, just to make sure we are all on
the same page, Hibernate's support for native SQL queries currently
recognizes named parameters, positional parameters as well as JDBC-style
parameters.
JPA only defines support for "JDBC-style parameters" as valid for native
SQL queries:
{quote}
It is assumed that for native queries the parameters themselves use the SQL
syntax (i.e., “?”, rather than “?1”).
{quote}
Furthermore Hibernate does not support a native query using both positional
parameters and JDBC-style parameters in the same query because it causes a
non-determinism wrt the positions.
I assume we want to continue to support that full complement of parameter
types, with the positional/JDBC-style caveat.
Further I assume we will hook up the use of any non-JDBC-style parameters
in with the "strict JPA compliance" checking and throw an error when
indicated.
Anyone have objections to any of that?
8 years, 3 months
HHH-9329
by Christian Beikov
Hey again,
I implemented the approach that I proposed in the issue and a test in
https://github.com/hibernate/hibernate-orm/pull/1561
It detects left joins with join tables that use the target table alias.
The join table is replaced with a subquery and the WITH clause is moved
to the join of the subquery.
Any comments?
Regards,
Christian
8 years, 3 months
JPA Jira project
by Steve Ebersole
I propose that we limit who has the ability to create issues in the
Hibernate Jira JPA project.
Users routinely create issues there incorrectly, rather than the ORM (HHH)
project.
8 years, 3 months
Limited history in HipChat
by Gunnar Morling
Steve, all,
Is there any way we can get HipChat Plus licenses for the team from
Atlassian?
The free client provides access only to a limited part of the chat history,
making it impossible to search for discussions discussed more than a few
weeks ago.
That's starting to be a real problem now that we've been using HipChat for
a while and early discussions begin to fall below the threshold of being
available in the free version.
I don't know whom to reach out to at Atlassian, otherwise I'd do it myself.
I'd hope they are supportive given that we can use JIRA at all for free,
too.
Thanks,
--Gunnar
8 years, 3 months
Build time downloads of ORM itself during an ORM clean build?
by Sanne Grinovero
Hi all,
I just happened to build Hibernate ORM's latest "master" on a clean
machine and this is how the build log looks like:
No compatible daemons found:
- an idle daemon with different JVM constraints can't run this build
Starting a new Gradle Daemon for this build: subsequent builds will be faster
:buildSrc:clean UP-TO-DATE
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes
:buildSrc:jar
:buildSrc:assemble
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build
Download http://repository.jboss.org/nexus/content/groups/public/org/hibernate/hib...
[...]
I'm not having any specific failure, but it seems very suspicious that
the build is needing to download hibernate-core at the very beginning
of the build?
I'm not familiar enough with ORM's build scripts to investigate myself
but I suspect some dependency order needs to be cleaned up, or you
might be including some side-effects from previous builds.
Thanks,
Sanne
8 years, 3 months
Cannot build branch 5.1
by Petar Tahchiev
Hi guys,
I'm trying to build the 5.1 branch with "./gradlew publishToMavenLocal" but
I get the following error:
:hibernate-ehcache:generatePomFileForMavenJavaPublication
:hibernate-ehcache:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Starting AnimalSniffer checks using [java16-1.0.signature] against
[sourceSets.main]
/home/petar/workspace/hibernate-orm/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateEhcacheUtils.java:104:
Undefined reference:
net.sf.ehcache.config.TerracottaConfiguration.ValueMode[]
net.sf.ehcache.config.TerracottaConfiguration.ValueMode.values()
/home/petar/workspace/hibernate-orm/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateEhcacheUtils.java:104:
Undefined reference:
net.sf.ehcache.config.TerracottaConfiguration.ValueMode
net.sf.ehcache.config.TerracottaConfiguration.ValueMode.IDENTITY
/home/petar/workspace/hibernate-orm/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateEhcacheUtils.java:104:
Undefined reference: int
net.sf.ehcache.config.TerracottaConfiguration.ValueMode.ordinal()
/home/petar/workspace/hibernate-orm/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateEhcacheUtils.java:104:
Undefined reference:
net.sf.ehcache.config.TerracottaConfiguration.ValueMode
net.sf.ehcache.config.TerracottaConfiguration.ValueMode.SERIALIZATION
/home/petar/workspace/hibernate-orm/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateEhcacheUtils.java:104:
Undefined reference: int
net.sf.ehcache.config.TerracottaConfiguration.ValueMode.ordinal()
:hibernate-ehcache:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':hibernate-ehcache:compileJava'.
> Signature errors found for SourceSet main against java16-1.0.signature.
Verify errors and ignore them with the proper annotation if needed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
BUILD FAILED
Total time: 23.979 secs
Can you please help me?
--
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611
8 years, 3 months
AvailableSettings.DISCARD_PC_ON_CLOSE and Transaction status
by Vlad Mihalcea
Hi,
While reviewing and adding a test case for
https://hibernate.atlassian.net/browse/HHH-11120,
I realized that if we enable the AvailableSettings.DISCARD_PC_ON_CLOSE
property,
the database connection gets closed when the EntityManager is closed, while
the EntityTransaction status remains ACTIVE.
I noticed that in the call:
currentHibernateTransaction.invalidate();
But this method is no-op and deprecated as well.
Is this behavior intended? If the database connection was closed, at least
for RESOURCE_LOCAL, on most RDBMS engines, the underlying transaction gets
rolled back as well.
For JTA, the connection might still be open and allocated to the current
user since the TM controls when the resources are to be released.
Should we leave this behavior like that?
Vlad
8 years, 3 months
[OGM] Issue with a test and the new operation grouping infrastructure
by Guillaume Smet
Hi,
This is a follow-up of https://github.com/hibernate/hibernate-ogm/pull/767 .
So, in the PR, I commented the following test:
ManyToOneGlobalTest>ManyToOneTest.testRemovalOfTransientEntityWithAssociation
(the "ManyToOneGlobalTest>" part is important)
The test is a Redis one but the issue is a general one.
When running under the ManyToOneGlobalTest umbrella, the associations
are created as separate documents.
The behavior of the test is the following:
========================
=== Creation phase
Create a SalesForce with 2 SalesGuys associated.
The association is managed by SalesGuy.
It creates 4 documents:
SalesForce1
SalesGuy1
SalesGuy2
SalesForce1_SalesGuy navigational information
=== Let's delete the SalesForce1 entity
It removes the SalesForce1 document (note that SalesGuy.salesForce has
a @NotFound(action = NotFoundAction.IGNORE) annotation).
So we end up with having:
SalesGuy1
SalesGuy2
SalesForce1_SalesGuy navigational information [1]
=== Then we delete the 2 SalesGuy
SalesGuys1 removed
-> SalesForce_SalesGuy navigational information updated
SalesGuy2 removed
-> SalesForce1_SalesGuy navigational information removed as it is empty [2]
========================
In [1], we still have the navigational information for SalesForce1 <->
SalesGuys.
With the new grouping infrastructure, I don't save every operation to
the datastore as it's currently done. I have to store the Association
object somewhere to keep track of the association state so I store it
in OgmEntityEntryState in a Map<String, Association>, the key being
the role of the association, just next to the Tuple which has the same
purpose. It works perfectly well except that when we arrive at [2],
the OgmEntityEntryState for SalesForce1 is gone as the entity has been
removed in [1] so I can't access the OgmEntityEntryState of the entity
and so the association document is not removed (and thus the test
fails as it checks there isn't any entity/association left).
Gunnar proposed the idea of storing the inverse Associations in the
OgmEntityEntryState of the association owner. It's indeed one way to
solve the issue.
The issue with this approach is that we need to have the association
owner when we create the AssociationPersister and, while it's not a
problem for most of the cases, I don't see how I can do it in
OgmLoader#getResultSet. I posted a WIP patch here:
https://gist.github.com/gsmet/e18ccb7d3f3494bb334647e540d0d4d0.
Opinions, thoughts?
--
Guillaume
8 years, 3 months