Commit Graph

866 Commits

Author SHA1 Message Date
Oliver Gierke
2d2fbd7fde DATAJPA-1095 - Updated changelog. 2017-04-19 21:04:06 +02:00
Oliver Gierke
2027fc0e87 DATAJPA-1094 - Updated changelog. 2017-04-19 20:01:38 +02:00
Oliver Gierke
64cc8cd1e3 DATAJPA-1072 - Updated changelog. 2017-04-19 13:03:59 +02:00
Oliver Gierke
ef1e0b33ff DATAJPA-1071 - Updated changelog. 2017-04-19 11:50:39 +02:00
Oliver Gierke
bbaebfca60 DATAJPA-1087 - Polishing.
Extracted QueryHints and DefaultQueryHints into dedicated files (still package scope). Removed handling of optional CrudMethodMetadata in favour of a null object implementation of QueryHints.

Original pull request: #196.
2017-04-18 16:57:07 +02:00
Christoph Strobl
0c174d5dfc DATAJPA-1087 - Apply query hints to count queries for Querydsl but leave out fetch graphs.
We now make sure to apply query hints also to count queries created via Querydsl Predicates but avoid applying potential fetch graphs.

Original pull request: #196.
2017-04-18 16:57:07 +02:00
Oliver Gierke
ceb69b1f63 DATAJPA-1075 - Polishing.
Formatting and generic types over raw types in Jpa21Utils. Removed superfluous EntityManager.flush() and ….clear() from EntityGraphRepositoryMethodsIntegrationTests. Formatting, spelling.

Original pull request: #192.
2017-04-18 10:27:32 +02:00
Christoph Strobl
5fd8578d30 DATAJPA-1075 - Append ad hoc EntityGraph subgraphs properly.
We now make sure to append instead of recreate subgraphs correctly when AttributeNodes already exist for a given property or dot path. This change fixes errors when creating ad hoc fetch graphs like below where multiple properties are loaded via a subgraph on the same type.

@EntityGraph(attributePaths = { "colleagues.roles", "colleagues.colleagues" })

Previously the first path was accidentally dropped. Additionally we fixed issues with the creation of "deep" ad hoc fetch graphs via @EntityGraph so that


@EntityGraph(attributePaths = { "roles", "colleagues.roles", "colleagues.colleagues.roles" })

can be used as a short form of

@NamedEntityGraph(name = "User.deepGraph",
        attributeNodes = {
                @NamedAttributeNode("roles"),
                @NamedAttributeNode(value="colleagues", subgraph = "User.colleagues")
        },
        subgraphs = {
                @NamedSubgraph(name = "User.colleagues", attributeNodes = {
                        @NamedAttributeNode("roles"),
                        @NamedAttributeNode(value = "colleagues", subgraph = "User.colleaguesOfColleagues")
                }),
                @NamedSubgraph(name="User.colleaguesOfColleagues", attributeNodes = {
                        @NamedAttributeNode("roles"),
                })

        })
})

We had to disable EclipseLink tests for this one since there seems to be a glitch when calling EntityManager.clear() prior to applying the fetch-/loadgraph causing the properties not to be in the correct load state. Omitting EntityManager.clear() is not an option since the load state is always LOADED even when leaving out query hints.

Related issue: DATAJPA-1041.
Original pull request: #192.
Related pull request: #188.
2017-04-18 10:26:06 +02:00
Oliver Gierke
7e14da8beb DATAJPA-1050 - Updated changelog. 2017-04-10 13:33:08 +02:00
Oliver Gierke
525c724384 DATAJPA-1009 - After release cleanups. 2017-04-04 22:08:18 +02:00
Oliver Gierke
0d4837e503 DATAJPA-1009 - Prepare next development iteration. 2017-04-04 22:08:12 +02:00
Oliver Gierke
5aaaeee490 DATAJPA-1009 - Release version 2.0 M2 (Kay). 2017-04-04 21:12:35 +02:00
Oliver Gierke
b1a7fbdf4d DATAJPA-1009 - Prepare 2.0 M2 (Kay). 2017-04-04 21:12:01 +02:00
Oliver Gierke
54d6de4ca4 DATAJPA-1009 - Updated changelog. 2017-04-04 21:11:52 +02:00
Oliver Gierke
c9641ffe4f DATAJPA-1085 - Upgraded Hibernate baseline to 5.2.
Removed build profiles for older Hibernate versions, Travis build setup for those. Removed reflection based code paths to support older versions of Hibernate.

Removed build profiles for Spring 5 and 4.3 as well.
2017-04-03 17:50:28 +02:00
Oliver Gierke
a8788be250 DATAJPA-1084 - Documented rationale behind the way that derived deleteBy-query methods are implemented. 2017-04-03 12:44:33 +02:00
Oliver Gierke
85b930dd07 DATAJPA-1079 - Adapt to API changes in RepositoryConfigurationExtensionSupport. 2017-03-24 20:28:48 +01:00
Oliver Gierke
30144795dc DATAJPA-1064 - Adapt to changes in Mockito 2.7. 2017-03-24 08:07:12 +01:00
Oliver Gierke
e1425581ab DATAJPA-1064 - Fixed spelling of Querydsl file names. 2017-03-24 08:07:12 +01:00
Oliver Gierke
a4614ca64a DATAJPA-1064 - Cleanups! Cleanups everywhere! 2017-03-24 08:07:12 +01:00
Oliver Gierke
d60c0cb513 DATAJPA-1064 - Fixed spelling in Querydsl types. 2017-03-24 08:07:12 +01:00
Oliver Gierke
a2c27c643c DATAJPA-1064 - Fixed spelling of Querydsl test.
Moved to new Pageable and Sort factory methods.
2017-03-24 08:07:11 +01:00
Oliver Gierke
6ad95aefd0 DATAJPA-1064 - Avoid nulls in PartTreeJpaQuery. 2017-03-24 08:07:11 +01:00
Oliver Gierke
3da91e9bb2 DATAJPA-1064 - Adapt to API changes in ResultProcessor. 2017-03-24 08:07:11 +01:00
Oliver Gierke
862e652f2c DATAJPA-1064 - Improvements in JpaPersistentEntity/Property.
Better use of Optional in implementations.
2017-03-24 08:07:11 +01:00
Oliver Gierke
8aa1e28e39 DATAJPA-1064 - Adapt to changes in auditing APIs.
Removed unnecessary null-wrapping.
2017-03-24 08:07:11 +01:00
Oliver Gierke
0fb18b134b DATAJPA-1064 - Adapted to changes in Pageable and Sort API.
Removed null-checks for Pageable. Use factory methods for Sort.
2017-03-24 08:07:10 +01:00
Christoph Strobl
59d6587627 DATAJPA-1064 - Add null guard for Optional (we actually should not need it).
However EntityManagerFactoryRefTests fail on cmd line when removing it though everything works fine when running tests from ide - strange things happen.
2017-03-24 08:07:10 +01:00
Christoph Strobl
6ab6050690 DATAJPA-1064 - Integrate Data Commons Java 8 upgrade branch.
Make sure things compile again and do the same as they have done before by checking and fixing unit and integration tests.
2017-03-24 08:07:10 +01:00
Oliver Gierke
a04d9b868b DATAJPA-1074 - Polishing.
Slightly changed the implementation to reject IsEmpty for non-collection properties. Minor formatting in unit tests.

Original pull request: #190.
2017-03-13 15:59:57 +01:00
Michael Cramer
90c8361679 DATAJPA-1074 - Added support for IsEmpty/IsNotEmpty keywords in query derivation.
We now translate the newly introduced IsEmpty / IsNotEmpty keywords into the corresponding Criteria API artifacts.

Original pull request: #190.
2017-03-13 15:59:57 +01:00
Oliver Gierke
d69c2cb676 DATAJPA-1051 - Updated changelog. 2017-03-02 11:10:54 +01:00
Mark Paluch
308f991575 DATAJPA-1054 - Remove references to Assert single-arg methods.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.

Related ticket: SPR-15196.
2017-02-01 10:25:53 +01:00
Oliver Gierke
f909a853a8 DATAJPA-1030 - Updated changelog. 2017-01-26 12:12:28 +01:00
Oliver Gierke
423aee118e DATAJPA-1031 - Updated changelog. 2017-01-26 12:12:03 +01:00
Oliver Gierke
00314e3a14 DATAJPA-1041 - Polishing.
Ignored test cases failing on EclipseLink. Formatting and a bit of Javadoc.

EntityGraphRepositoryMethodsIntegrationTests.shouldRespectDynamicFetchGraphForGetOneWithAttributeNamesById() has to be ignored now as the new wiping of the EntityManager - which is needed to actually make the test test what's intended to be tested - reveals the same Eclipselink issue the newly introduced tests reveal, too.
2017-01-25 14:18:36 +01:00
Christoph Strobl
af8631dab4 DATAJPA-1041 - Fixed application of complex ad-hoc fetch graphs.
We now properly calculate complex ad-hoch fetch graphs. Previously, deeply nested graphs could have been mixed up in certain circumstances.
2017-01-25 14:18:36 +01:00
Christoph Strobl
8fd298686f DATAJPA-1049 - Update "what’s new" section in reference documentation. 2017-01-25 11:52:17 +01:00
Oliver Gierke
0d6376d6d8 DATAJPA-1005 - Improved lookup of EntityManagerFactory bean definitions for constructor injectability.
Our bean definition check for EntityManagerFactory instances previously expected the type prediction to return exactly EntityManagerFactory. That should theoretically always be the case as the component inspecting the beans is a BeanFactoryPostProcessor, i.e. running before any of the beans should have been instantiated.

If however an EntityManagerFactoryBean is already in creation and the EntityManagerFactory backing it is already available, the factory bean will return the concrete factory's type (see AbstractEntityManagerFactoryBean.getObjectType()) so that we have to accept subtypes of EntityManagerFactory in our selection process.

Related ticket: DATAJPA-1045.
2017-01-25 11:50:37 +01:00
Oliver Gierke
953d469718 DATAJAP-1048 - Upgraded Hibernate 5.2 build profile to 5.2.7. 2017-01-20 22:19:59 +01:00
Oliver Gierke
3c67375985 DATAJPA-1044 - JpaCountQueryCreator now uses count distinct for distinct queries.
We now explicitly use a count (distinct x) clause for count queries in case the distinct flag is set on the derived query method.

Updated HibernateQueryUtils to make sure we unwrap the Query proxy properly before we invoke the lookup method via reflection.

Original pull request: #187.
2017-01-20 22:17:09 +01:00
Mark Paluch
71c0892546 DATAJPA-1043 - Update project documentation with the CLA tool integration. 2017-01-13 11:37:55 +01:00
Mark Paluch
2b45ccbc11 DATAJPA-1042 - Polishing.
Convert @see http://… links to valid format using @see <a href=…>…</a>.
2017-01-13 09:36:08 +01:00
Mark Paluch
5a3102fa3d DATAJPA-1042 - Migrate ticket references in test code to Spring Framework style. 2017-01-13 09:36:02 +01:00
Oliver Gierke
9aa929d15b DATAJPA-994 - Updated changelog. 2016-12-21 19:35:20 +01:00
Oliver Gierke
0bea9cc2aa DATAJPA-939 - Updated changelog. 2016-12-21 18:42:49 +01:00
Oliver Gierke
a39c6cd79f DATAJPA-1019 - Upgrade Hibernate 5.2 build to 5.2.6. 2016-12-21 12:48:46 +01:00
Mark Paluch
7eb5818474 DATAJPA-1027 - Use newer Java 8 on Travis CI. 2016-12-16 11:28:35 +01:00
Oliver Gierke
cd9f9ab9f4 DATAJPA-1026 - Adapt API in JpaRepositoryFactoryBean.
Related ticket: DATACMNS-891.
2016-12-15 16:17:23 +01:00
Oliver Gierke
8fbc1d0326 DATAJPA-1023 - StreamExceution now rejects non-transactional execution.
StreamExecution now makes use of the newly introduced SurroundingTransactionDetectingMethodInterceptor to find out about whether the transaction is used in code that already has a transaction running. This is necessary to make sure the Stream returned by the method can actually be consumed as the surrounding transaction keeps the transaction open.

Related tickets: DATACMNS-959.
2016-12-14 16:08:24 +01:00