408 Commits

Author SHA1 Message Date
Spring Buildmaster
b17883db88 DATAJPA-488 - Prepare next development iteration. 2014-03-10 06:27:57 -07:00
Spring Buildmaster
284e6bb613 DATAJPA-488 - Release version 1.4.5.RELEASE. 2014-03-10 06:27:52 -07:00
Thomas Darimont
838f4d1b33 DATAJPA-488 - Prepare Release 1.4.5.
Updated pom, readme and changelog.
Adjusted links in reference doc.

Original pull request: #63.
2014-03-10 14:17:49 +01:00
Oliver Gierke
7ad25f3ee5 DATAJPA-492 - Altered implementation of findAll(Iterable<ID>) to work around bug in OpenJPA.
Changed the implementation of SimpleJpaRepository.findAll(Iterable<ID>) as OpenJPA still doesn't correctly bind in-clauses by name. This has been originally reported in [0] and marked fixed for 2.3.0 but even an upgrade to this version (coming in a subsequent commit) requires the workaround.

[0] https://issues.apache.org/jira/browse/OPENJPA-2018
2014-03-07 18:42:16 +01:00
Oliver Gierke
76c0aaa699 DATAJPA-485 - Upgraded to Hibernate profiles to 4.3.4 and 4.2.10. 2014-03-04 11:23:31 +01:00
Oliver Gierke
0bc144184a DATAJPA-483 - Fixed parameter binding detection with parentheses.
When a parameter was listed with parentheses we didn't detect a custom binding and fell back to the standard binding. This effectively disabled the array-to-collection binding which is currently necessary for in bindings as some persistence providers do not bind arrays to in-clauses correctly.

Tweaked the regular expression to detect the bindings to accept the optional parentheses.
2014-02-27 10:11:44 +01:00
Oliver Gierke
8022342188 DATAJPA-474 - Fixed documentation on CDI setup of EntityManagers.
Previously, the reference documentation was missing details of how to set up EntityManager instances for usage of Spring Data JPA repositories in a CDI context. Augmented the section on complete manual setup but also added an example of the necessary setup in a pure JavaEE context.
2014-02-23 16:11:25 +01:00
Oliver Gierke
1933d484fa DATAJPA-473 - Fixed bug in binding detection in String queries.
Query parameter binding replacements were undone if a simple binding was contained in the query. Fixed that and also make sure we don't create superfluous multiple bindings for the same variable and binding type.
2014-02-23 14:11:20 +01:00
Marten Deinum
2fadfd9666 DATAJPA-462 - Updated FAQ on how to integrate Spring Data JPA with an existing Hibernate data access layer. 2014-02-19 14:59:54 +01:00
Spring Buildmaster
0c7fc0a8d1 DATAJPA-463 - Prepare next development iteration. 2014-02-17 04:24:31 -08:00
Spring Buildmaster
6ae7ba153e DATAJPA-463 - Release version 1.4.4.RELEASE. 2014-02-17 04:24:29 -08:00
Thomas Darimont
ca96e1bae9 DATAJPA-463 - Prepare release 1.4.4.
Updated pom.xml, change log, references to Spring Data Commons reference documentation etc.
2014-02-17 13:11:06 +01:00
Oliver Gierke
5d1f41ed62 DATAJPA-461 - Improve binding detection.
Improved the regular expression to detect binding detection to safely find as-is bindings.
2014-02-11 18:24:08 +01:00
Oliver Gierke
cd26a36a7b DATAJPA-461 - Polishing of binding implementation for StringQueries.
We now always create a ParameterBinding for all parameters to simplify the client code so that it can safely always lookup bindings and apply them.

Changed the setup of the regular expression to work with the keywords provided by the binding types to ease future extensions.

Added integration test to quickly verify the EclipseLink bug we're running into now for further reference.

Original pull request: #56.
2014-02-11 15:33:33 +01:00
Oliver Gierke
2945dbd0c2 DATAJPA-461 - Fixed regression in parameter binding of arrays.
Enhanced binding of parameters in StringQueryParameterBinder to be able to deal with situations where a parameter value has to be converted to be correctly bound e.g. for parameter values in IN-expressions.

We now only convert array values to collections if the value is to be bound in the context of an IN-parameter. Previously we erroneously always converted an array value to a collection value which lead to problems if an array value was meant to be used "as-is" e.g. in cases where an user wants to query for a certain byte[].

Original pull request: #56.
2014-02-11 15:33:25 +01:00
Oliver Gierke
30bd5b5416 DATAJPA-454 - Fixed join creation in QueryUtils.
QueryUtils now only creates a join for collection properties that are explicitly annotated with an @ManyTo… annotation. This allows collection like properties like byte[] be referred to as non-collection property and thus not trigger a join when a derived query is created.
2014-02-06 19:21:53 +01:00
Oliver Gierke
0cfd24d051 DATAJPA-444 - Prefer Hibernate 4.3 provider interface over legacy one.
Accessing the legacy persistence provider class in Hibernate 4.3 causes a warning being logged. As we generally want to detect the presence of Hibernate in general only, we now check for the Hibernate 4.3 persistence provider interface first to immediately find the new interface and thus avoid the warning.

Upgraded to Hibernate 4.3.1.
2014-01-24 17:32:19 +01:00
Oliver Gierke
40512453b7 DATAJPA-448 - Added contribution guidelines.
Linked to the actual contribution guidelines maintained in the Spring Data Build project.
2014-01-14 13:42:00 +01:00
Oliver Gierke
498f4feedc DATAJPA-443 - Upgraded to Hibernate 4.2.8 and 4.3.0. 2014-01-14 13:42:00 +01:00
Thomas Darimont
659c6d1db7 DATAJPA-444 - Improve detection of PersistenceProvider implementations.
Since the location of the Hibernate EntityManager implementation changed in Hibernate 4.3 to org.hibernate.jpa.HibernateEntityManager, we now support org.hibernate.jpa.HibernateEntityManager as well as  org.hibernate.ejb.HibernateEntityManager as a Hibernate PersistenceProvider.

Original pull request: #55.
2014-01-09 09:41:58 +01:00
Spring Buildmaster
3e8cccd465 DATAJPA-434 - Prepare next development iteration. 2013-12-12 02:21:08 -08:00
Spring Buildmaster
1962540c12 DATAJPA-434 - Prepare release version 1.4.3.RELEASE. 2013-12-12 02:21:05 -08:00
Thomas Darimont
fe07e25b19 DATAJPA-434 - Prepare release 1.4.3.
Updated changelog, notice and readme.
Updated SD commons dependency to 1.6.3.RELEASE.
2013-12-11 18:14:29 +01:00
Thomas Darimont
549ce5bb04 DATAJPA-410 - Improved documentation on jpa:repository namespace.
We now mention that we require a bean with name transactionManager to be present if no transaction-manager-ref is defined.

Original pull request: #47.
2013-12-11 00:51:21 +01:00
Komi Serge Innocent
466dfcada9 DATAJPA-420 - Fixed count projection for manual queries with projections.
Original pull request: #52.
2013-12-10 23:20:16 +01:00
Oliver Gierke
a2f6b4c5df DATAJPA-430 - Tweaks to be compatible with Hibernate 4.3.
Latest Hibernate 4.3 releases have changes some behavior and internals slightly. Adapted the test cases accordingly and added another guard in JpaMetamodelEntityInformation to adhere to the new behavior.

Added build profile to be able to build against Hibernate 4.3.
2013-12-09 14:44:45 +01:00
Oliver Gierke
500cd315d1 DATAJPA-427 - Generate left joins for referenced associations in sort expressions.
Previously sorting by property of an associated object generated an inner join instead of a left join with QueryDsl and Hibernate. That excluded records that had null values on their join columns. We now generate appropriate left joins if we detect associations in the sort property expression.

Ignored test cases for EclipseLink since eclipse link generates an inner-join instead of an outer-join to fetch associations in order by. Filed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=422450

Original pull request: #53.
2013-12-04 14:21:50 +01:00
Thomas Darimont
6a26db86cf DATAJPA-424 - Fixed alias detection in manually defined queries using SpEL.
ExpressionBasedStringQuery now resolves and evaluates SpEL expressions of the actual query in the constructor and passes the resolved query to the StringQuery constructor. This enables the alias detection mechanism to work properly.

Original pull request: #51
2013-11-07 14:08:55 +01:00
Oliver Gierke
df55a8525d DATAJPA-405 - Guard against null predicates on query creation.
We now only call CriteriaQuery.where(…) if the predicate we handle is a non-null value. Adapted Jpa(Count)QueryCreator accordingly.
2013-10-27 17:38:12 +01:00
Spring Buildmaster
0a449d27a3 DATAJPA-411 - Prepare next development iteration. 2013-10-25 07:44:19 -07:00
Spring Buildmaster
06a8980a37 DATAJPA-411 - Release version 1.4.2.RELEASE. 2013-10-25 07:44:17 -07:00
Oliver Gierke
b0aff77731 DATAJPA-411 - Prepare 1.4.2.RELEASE.
Updated Spring Data Commons dependency to 1.6.2.RELEASE. Updated changelog, readme.md etc.
2013-10-25 16:34:00 +02:00
Oliver Gierke
9c1d8c8930 DATAJPA-409 - Added unit test for count query creation for nested references. 2013-10-03 19:31:17 +02:00
Thomas Darimont
a3845a8114 DATAJPA-407 - Fixes potential IndexOutOfBoundsException in ClasspathScanningPersistenceUnitPostProcessor.
So far, ClasspathScanningPersistenceUnitPostProcessor threw an IndexOutOfBoundsException on Windows as the OS-specific file separator doesn't match the forward slash used in the URI. This is fixed by modified scanForMappingFileLocations() to use '/' to build up the resource path.

Original pull request: #44.
2013-10-01 15:40:44 +02:00
Thomas Darimont
6220a2a59d DATAJPA-406 - Fix documentation of default value in @Modifying.
Corrected documentation to reflect the actual state of the @Modifying annotation which is that the clearAutomatically attribute is set to false by default. The implications of setting this attribute to true (which causes all pending non-flushed changes to be dropped) are now stated clearly.

Original pull request: #43.
2013-10-01 13:46:26 +02:00
Thomas Darimont
b98a7dd4f2 DATAJPA-396 - Fixed potential multi-threading issues in PartTreeJpaQuery.
The CriteriaQuery implementations unfortunately is not thread-safe for some persistence providers. E.g. Hibernate changes the state of it's implementation during the first attempt to use the instance. This causes multi-threading issues if we cache the query instance for later usage (as the instance might be used concurrently).

We now synchronize the first usage of the cached CriteriaQuery instance to guard against this situation.

Original pull request: #42.
2013-09-30 18:53:48 +02:00
Oliver Gierke
858f5bb7de DATAJPA-401 - Non-optional associations don't trigger join creation anymore.
When building Expression instances for attribute traversals we now inspect the mapping annotation to detect non-optional associations and prevent an extra left join from being created. This is because the join is only necessary to not drop null values from the result.

Added integration tests for Hibernate, EclipseLink and OpenJpa. EclipseLink needs a bit of special treatment as it exposes the inner join being created for a plain ….get(…) attribute traversal.
2013-09-25 12:12:18 +02:00
Oliver Gierke
8ef64271d3 DATAJPA-403 - Improve predicate building by reusing existing joins if possible.
QueryUtils now checks already existing joins and reuses them when building expressions. Inspired by the pull request #41 by Alexandre Payment but polished and added integration test to make sure the joins really get reused.
2013-09-25 09:35:22 +02:00
Spring Buildmaster
675d65bfda DATAJPA-400 - Prepare next development iteration. 2013-09-09 23:21:22 -07:00
Spring Buildmaster
1b1549a68b DATAJPA-400 - Release version 1.4.1.RELEASE. 2013-09-09 23:21:19 -07:00
Thomas Darimont
58df3962f1 DATAJPA-400 - Prepare 1.4.1 Release. 2013-09-10 08:11:39 +02:00
Spring Buildmaster
fb285c3197 DATAJPA-386 - Prepare next development iteration. 2013-09-09 15:39:23 -07:00
Spring Buildmaster
0e2663e9a4 DATAJPA-386 - Release version 1.4.0.RELEASE. 2013-09-09 15:29:59 -07:00
Thomas Darimont
d41a466b4d DATAJPA-386 - Prepare 1.4.0 Release. 2013-09-09 15:26:18 -07:00
Thomas Darimont
63082054bf Fixed project name in readme.md 2013-08-27 14:27:02 +02:00
Oliver Gierke
dfff8ef174 DATACMNS-357 - Test case for new state detection for entities with primitive ids.
Ignore test case for EclipseLink as it throws an exception complaining about long being used where Long is expected.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=415027
2013-08-14 10:16:11 +02:00
Oliver Gierke
e5e4b4dd3b DATAJPA-347 - Upgrade to Spring Data Commons 1.6.0.BUILD-SNAPSHOT. 2013-08-14 09:24:53 +02:00
Oliver Gierke
0b9e711315 DATAJPA-375 - Fixed application of sort to queries with existing order by.
Improved existingin order by detection to detect the existing clause independent of the case. Before we only detected lower case "order by" expressions.
2013-08-13 13:06:48 +02:00
Dale Wijand
e65dec893d DATAJPA-392 - Fixed typo in package-info.java of utility package.
Original pull request: #17.
2013-08-13 12:09:23 +02:00
Oliver Gierke
a1b939f6ab DATAJPA-388 - CDI extension now detects @Alternative EntityManagers.
We now make sure an alternative EntityManager (producer) is overriding a previously found EntityManager. Vice versa, we do not override a previously found one, except it marked as alternative.
2013-08-12 13:08:24 +02:00